vlookup using cell as path

orsm6

Active Member
Joined
Oct 3, 2012
Messages
496
Office Version
  1. 365
Platform
  1. Windows
hi all - been trying to use a vlookup formula to get a result. lots of variables in this.

- look up value is dynamic
- the path/file to be looked up is dynamic, so i was using a formula in this cell (K9) to build the path/file name

i tried to use this formula but all i get is #REF!: =VLOOKUP(C5,INDIRECT("'["&K9&"]Data'!$B$55:$C$80"),2,0)

the file is on a network path, hope that doesn't matter. When i directly code it in like this it works, even when the source book is closed.
VLOOKUP(C5,'\\mdzausutwfnp001\shardata\IL6S\07 Health, Safety & Environment\Pillar Work Processes\BOS\2021 BOS Tracking\2021 BOS Trackers\[2021 BOS Tracker - Hart Fill-Pack - DO NOT OVERWRITE.xlsm]Data'!$B$55:$C$80,2,0)

where am i going wrong?

TIA
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
If you need to open the other workbook.
Then in the 1st workbook, manually type in = then go to the other workbook and select that same data range.
Close the other workbook. You should now have the full address. Compare that to the f9 result character by character.
 
Upvote 0
If you need to open the other workbook.
Then in the 1st workbook, manually type in = then go to the other workbook and select that same data range.
Close the other workbook. You should now have the full address. Compare that to the f9 result character by character.
Oh... having the other workbook open actually makes it work... sorry that was the only thing i didn't try.

i did have it open at one point but the formula didn't work, so closed it without thinking about it... sorry
this should only work with the network workbook open yeah?
 
Upvote 0
Oh... having the other workbook open actually makes it work... sorry that was the only thing i didn't try.

i did have it open at one point but the formula didn't work, so closed it without thinking about it... sorry
this should only work with the network workbook open yeah?
Sadly it does appear that Indirect won't work on a closed workbook.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,799
Members
449,337
Latest member
BBV123

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