Vary a sheet name in a formula

bayles

Board Regular
Joined
Oct 31, 2013
Messages
54
Hi,

I am trying to reference different sheets in a formula which are named:

CATEGORY HIERARCHY (1)
CATEGORY HIERARCHY (2)
CATEGORY HIERARCHY (3)

The (X) value I have in cell AG537 but for some reason the following formula is not working. I have entered the correct sheet name and the formula works but not when I try to keep ti dynamic.

=HLOOKUP($V537,"'CATEGORY HIERARCHY ("& AG537 &")'!A1:Q35",2,FALSE)

Any ideas?

Thanks
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi,

I figured this one out myself for anyone searching this thread.

=HLOOKUP($V537,INDIRECT("'CATEGORY HIERARCHY ("& VALUE(AG537) &")'!A1:Q35",TRUE),2,FALSE)

Thanks
 
Upvote 0
You're going to have to use INDIRECT. The text reference it needs is:
=HLOOKUP($V537,Indirect("'CATEGORY HIERARCHY "&AG537&"'!A1:Q35"),2,FALSE)

Jeff


 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,976
Members
448,934
Latest member
audette89

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