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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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,214,581
Messages
6,120,368
Members
448,957
Latest member
BatCoder

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