I have a simple vlookup formula refrencing the array from a different excel file on a server, but the name of this file changes daily with the date in the name. can I have my file use a local cell to update the name of the reference file on the server:
For example "Book2.xlsx" would be the server path, but this name changes every morning:
=VLOOKUP(H2,[Book2.xlsx]Sheet1!$A:$B,2,FALSE)
can I do something like this where cell N2 contains the path to the array ([Book2.xlsx]Sheet1!$A:$B) so the formula will update automatically?
=VLOOKUP(H1,N2,2,FALSE)
Or something like this and have just the path (Book2.xlsx) in N2:
=VLOOKUP(H1,"["&N2&"]Sheet1!$A:$B",2,FALSE)
You are right on track, but you just missed a small function -=VLOOKUP(H1,INDIRECT("["&N2&"]Sheet1!$A:$B"),2,FALSE)
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks