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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

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