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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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