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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

jsotola

Well-known Member
Joined
Nov 15, 2013
Messages
524
that is your problem

this is not a valid command

=SUM(INDIRECT("it is Test Range 1"))
 

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
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.
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,587
Messages
5,637,274
Members
416,963
Latest member
samfuge

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
Top