Telling excel that a value in a cell is the sheet name

drater

New Member
Joined
Dec 12, 2005
Messages
5
Hi everyone,

In excel, I have a list sheet names in a collumn B. To the right of collumn B, I want to do a vlookup to retrieve values from those sheets in collumn B. However, instead of manually entering the sheet name in the vlookup formula, I would just like the value in collumn B to fill in the sheet name in the formula.

For example, instead of saying Cat!c5, I would like to say b3!c5, where b3 says the word cat in the sheet I am currently in.

Thanks for your help.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

drater

New Member
Joined
Dec 12, 2005
Messages
5
Thanks. I have gotten it to work when linking to a sheet within the workbook. What if I want to link to a sheet in another workbook. I get a #NAME? error which I believe is from the filename of the other workbook.
 

drater

New Member
Joined
Dec 12, 2005
Messages
5
This is what I typed in:

=vlookup(c2,[Reports.xls]indirect(d32&"!$A$36:$A$41"),18)
 

drater

New Member
Joined
Dec 12, 2005
Messages
5
=VLOOKUP(C2,INDIRECT("'[Reports.xls]"&D32&"'!$a$36:$r$41"),18)


Is the statement written correctly? I changed it but still get an error message.

Thanks.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,625
Messages
5,832,750
Members
430,163
Latest member
YesImAk

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
Top