Indirect & Dynamic Range

TheNoocH

Well-known Member
Joined
Oct 6, 2004
Messages
3,482
I created a dynamic range on a sheet called Tables...

I want to reference that range from a seperate sheet via the INDIRECT function...but just can't seem to get it to work properly...

NOTE: i'm able to to do it no problem if the range is on the same sheet...I just don't know what the syntax would be for referencing via the other sheet...

i tried

=INDIRECT("Tables!"&B1) but get a #REF ...

any thoughts?

EDIT...in case it makes a difference I'm trying to utilize it as my source in data validation (XL2007)
 
Last edited:

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I assume B1 value is the named range name? That works for me if I have a named range in B1 and Tables is the name of the workbook?

Not sure if that is true for your situation or not?

Also I tried this on 2003, as I don;t ahve 2007 at work.
 
Upvote 0
Yes B1 on Sheet1 is the name of the named range...eg Branch
On the Tables worksheet is where the named range Branch resides...

But when i put in INDIRECT(B1) in the data validation it brings up a dialog box which states:
The Source currently evaluates to an error. Do you want to continue?

If I change the source in the data validation to =Branch (ie going directly based upon the named range rather than using INDIRECT) then it works fine...

but i really need to reference it via INDIRECT since the value in B1 can change to any of 3 named ranges (ie controlled via a validation list)...
 
Upvote 0
***EDIT***
I think I found the cause...I'm using dynamic named ranges...if i switch to regular named range it works fine...any thoughts on how to get around this since my ranges really need to be dynamic...would my best best bet be to let the external query refresh on open then through vba name the range?
 
Upvote 0
***EDIT***
I think I found the cause...I'm using dynamic named ranges...if i switch to regular named range it works fine...

The diagnosis is right.

any thoughts on how to get around this since my ranges really need to be dynamic...would my best best bet be to let the external query refresh on open then through vba name the range?

D2 is data validated with List consisting of items

SubListA
SubListB
SubListC

Each item is a dynamic named range.

Data validate F2 with...

=CHOOSE(MATCH(D2,List,0),SubListA,SubListB,SubListC)

while the Ignore Blank option is unchecked.
 
Upvote 0

Forum statistics

Threads
1,215,316
Messages
6,124,226
Members
449,148
Latest member
sweetkt327

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