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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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