VLOOKUP another workbook where directory is based on cell values

AntChr

New Member
Joined
Jan 7, 2018
Messages
1
Hi there,

It's more a general question than purely related to the vlookup function. I am currently able to pull cell data into a worksheet from other workbooks. When I specify the directory in full, the data pulls through:

e.g. C:\User\Miscellaneous\Example - 1.xls

However, is it possible to use cell references in the formula to define the directory, such as:

e.g "C:\User\Miscellaneous"&D2&" - " &E2&".Xls"

It doesn't recognize the directory no matter what I try. I do have VBA for FileExists and CheckDir that allows me to use this form of formula. Would I need to do something similar in this instance to pull date in this way?

Any assistance would be much appreciated.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Use VLOOKUP(XX, INDIRECT(F2), 2, false) where F2 is a consolidated formula/cell where you have concatenated everything you have in your second e.g. The catch is that it won't read external workbooks unless they are open. It's something that MS has never fixed, even though this has frustrated millions of Excel users for decades.
 
Upvote 0

Forum statistics

Threads
1,215,131
Messages
6,123,222
Members
449,091
Latest member
jeremy_bp001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top