Dynamic range name when it starts in a row > 1? Counta() does not work for me!

actjfc

Active Member
Joined
Jun 28, 2003
Messages
416
Excel friends,

I would like to setup a dynamic range name for B9:C20. I have tried out too many online examples using Counta(), but those examples do not work for me. B9:C20 starts in row 9, and it is two columns wide. Variations of this formula do not work for me: OFFSET($B$9,0,0,COUNTA($C:$C),1)

Can somebody help me out?

Thanks!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
The Final 1 is what's doing you in here. Change it to a 2 and you should be all good.

OFFSET($B$9,0,0,COUNTA($C:$C),2)

Though be aware, this will count all entries anywhere in column C. Is that what you want? You might prefer something more like:

OFFSET($B$9,0,0,COUNTA($C9:$C20),2)

That arrangement will check how many entries are in C9:C20 and then return you that many in the dynamic range.
 
Last edited:
Upvote 0
Thanks, it works, but not 100% as I need! Yes, I want it to count all entries in column C. This range feeds a vlookup range that must dynamically increase in size if it is extended beyond C20+. When I setup the range name it was highlighting a range that was beyond C20+ for a few rows. I realized that subtracting the count of blanks that are up in C1:C8 will fix it. So, OFFSET($B$9,0,0,COUNTA($C:$C)-COUNTIF($C$1:$C$8,""),2) works perfect now . Thanks for your help, the "2" was the key to find my answer.
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,123
Members
452,546
Latest member
Rafafa

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