How do I count non blank rows only?

S

Susan Mc

This seems so simple but I've spent hours without resolution. In column A,
I need to count the number of rows that actually have data in them. If there
is no data, I need to keep column A blank. Here's an oversimplied example of
my simple list.

1 John Doe
2 Susan Smith
3 Joe Dear

In column A now I have =COUNTA($B$2:B64) and that works great until you
hit a row with no data.

I have tried all these:
=IF(G69>0,(=COUNTA($B$2:B69))," ")

Also =COUNTIF($B$2:B69,">0")

There's got to be an easy way that I'm missing!! HEEEELP please.

Thank you,
Susan
 
M

MartinW

Hi Susan,

Not sure but it sounds like you need something to put in A2 and drag down.
Maybe this =IF(B2="","",COUNTA(B$2:B2))

HTH
Martin
 
G

Gord Dibben

COUNTA will count only non-blank cells.

What are you trying achieve with your formula(s) in column A?

Where does G69 come into play?

Maybe =IF(B2="","",COUNTA($B$2:B64))

Entered in A2 and copied down?


Gord Dibben MS Excel MVP

On Sun, 22 Jun 2008 06:30:01 -0700, Susan Mc <Susan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top