make a vlookup using a variable path

G

Guest

Hello,
I have 10 files which are identicals. In han other workbook, I use vlookup
from any of the 10 files depending of the records. In this workbook, I have a
column which contains the name of each files from which I would like to make
the vlookup. So, I would like to make a vlookup using a variable path name.
What is the function to convert a variable path name in text to a real path
name in Vlookup ?
VLOOKUP($A2;concatenate("c:\";B2;"Merge!$B$2:$AL$300");2;0)
B2 = variable file name
Thanks,
 
B

Bob Phillips

=VLOOKUP($A2;INDIRECT("c:\"&B2&"Merge!$B$2:$AL$300");2;0)


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top