Including a cell value in the file name for vlookup

rascough

New Member
Joined
Oct 22, 2003
Messages
13
Hi there,

I am trying to add a cell value into a file name that is used for a vlookup, (although you probably figured that from my subject)

My current formula is
=VLOOKUP(C11,'[bottle plan 486.xls]plan'!$A$2:$E$31,3,FALSE)

However I would like to replace the 486.xls with the value entered in cell A1
=VLOOKUP(C11,'[bottle plan A1.xls]plan'!$A$2:$E$31,3,FALSE)

Bascially we might have 4 current bottle plans 486, 487, 488, 489 and the lookup value would change accordingly

Have tried a few variations of & and indirect but cant figure it out, would this need to be a macro?

once this works i might look at a similar formular to change from "bottle plan" to "can plan" based on a dropdown on cell value. but Im assuiming it would be the same approach


Regards
Richard
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi Richard

Try the following:

=VLOOKUP(C11,INDIRECT("'[bottle plan " & A1 & ".xls]plan'!$A$2:$E$31"),3,FALSE)

Hope it helps

Regards

Richard
 
Upvote 0

Forum statistics

Threads
1,214,407
Messages
6,119,332
Members
448,888
Latest member
Arle8907

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