Can you use text in a cell to define a worksheet?

MrStrawb

New Member
Joined
May 2, 2019
Messages
6
I would like to know if it is possible to use text from a cell to define a worksheet name within a vlookup?

I have a power query with item product codes, each product code has its own worksheet containing details of the item

Currently I am manually changing the name of the sheet within the vlookup for each item however wondered if there is a way i can reference worksheet name via text in a cell i.e. =b$3 so that i can drag the formula across to automatically lookup cell c$3,c$4,c$5 etc?

Any advice would be greatly appreciated

Thanks in advance

Adam
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
You can use INDIRECT. Heres an example:

=VLOOKUP(A2,INDIRECT("'"&A1&"'!B:C"),2,0)

where the lookup value is in A2 and the sheet name you want to search is in A1.
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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