Indirect and dynamic named ranges

jamtay317

Well-known Member
Joined
Mar 6, 2013
Messages
769
Hello, I have a several dynamic ranges that are similar to:

Code:
=Sheet2!$C$2:INDEX(Sheet2!$C:$C,MATCH(9.99E+307,Sheet2!$C:$C))

and then on another sheet (same workbook) I have a data validation list with a list of the named ranges.

Im useing this formula:
Code:
=SUM(INDIRECT(C2))
and getting a #ref error. Please advise.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
that is your problem

this is not a valid command

=SUM(INDIRECT("it is Test Range 1"))
 
Upvote 0
The problem is pretty much that Indirect doesn't work with a dynamic range.
I'm not aware of any workaround (not saying there isn't one, I'm just not aware of it)

The named ranges pretty much need to be kept static to be used with Indirect.
 
Upvote 0
Hi

Indirect does not work with dynamic named ranges.

2 options

1 - If possible forget the dynamic range. In man«y cases you can use a static range. You are summing the values from C2 to the last number in column C. Since the Sum() function ignores the blanks you can simply define de named range as

=Sheet2!$C$2:$C$1000

or choose other last row that you're comfortable with

2 - use vba to get the range.
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,377
Members
448,955
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