named range used as argument in ROWS or COLUMNS function results in #VALUE! error

ask2tsp

Well-known Member
Joined
Feb 18, 2015
Messages
506
Office Version
  1. 365
Platform
  1. Windows
named range namedRng
="$A$1:"&ADDRESS(COUNTA($A:$A);COUNTA(!$1:$1);1)
that in my case evaluates to
$A$1:$H$74

when a cel contains the formula
=ROWS(namedRng)
it shows #VALUE!
i tried evaluate formula where the formula evaluates to ROWS($A$1:$H$74)

when a cel contains the formula
=ROWS($A$1:$H$74)
it shows 74

what is going on here?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Using the address function will return a string. You will need to use the indirect function to get this to work in conjunction with this formula.... use =indirect("$A$1:"&ADDRESS(COUNTA($A:$A),COUNTA($1:$1),1)) for your named range.
 
Upvote 0
Using the address function will return a string. You will need to use the indirect function to get this to work in conjunction with this formula.... use =indirect("$A$1:"&ADDRESS(COUNTA($A:$A),COUNTA($1:$1),1)) for your named range.

thanks for your explanation. helped a lot
 
Upvote 0

Forum statistics

Threads
1,215,065
Messages
6,122,945
Members
449,095
Latest member
nmaske

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