Using a cell string as sheet reference

OneLooseCrank

New Member
Joined
Feb 5, 2016
Messages
27
Hi all,
I currently have:
=VLOOKUP($A3,'9X'!$A$5:$Q$35,11,FALSE)
Where the sheet name is [9x]. I would like to change this to the contents of a cell - logically (or not as it seems) I thought I would try:
=VLOOKUP($A3,'(D3)'!$A$5:$Q$35,11,FALSE)
where it should pull the contents of D3 to fill the quotation marks and thus complete the sheet reference. It doesn't work like that however! Any thoughts?
Thanks,
OLC
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Whenever build a range dynamically, you need to use the INDIRECT function to convert the string you are building to a range.
Try:
Code:
=VLOOKUP($A3,INDIRECT("'" & D3 & "'!$A$5:$Q$35"),11,FALSE)
 
Upvote 0
Whenever build a range dynamically, you need to use the INDIRECT function to convert the string you are building to a range.
Try:
Code:
=VLOOKUP($A3,INDIRECT("'" & D3 & "'!$A$5:$Q$35"),11,FALSE)

Stunning :) That's just done a cracking job for 300 records - all now getting their sheet reference without me typing the thing repeatedly!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,667
Members
449,462
Latest member
Chislobog

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