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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,217,134
Messages
6,134,843
Members
449,892
Latest member
deathtomasz

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