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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

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,887
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,486
Messages
5,837,611
Members
430,505
Latest member
DevAlex

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