count cells wityh text?

  • Thread starter Thread starter Silvabod
  • Start date Start date
S

Silvabod

Need to count the number of filled (text)cells in a column on a different
sheet.

Tried =countif('!sheet2!'B1:B90<>"" but got syntax error. Despite the
"fx helper", can't get the syntax right.
It should return 59 (there are 59 names currently in the range).

I range-named B1:B90 as "names" thinking that might help - no. What's the
correct way to count "text" cells, in a named range, please?
 
You could try

=COUNTA('!sheet2!'B1:B90)

which will count numbers as well. If you want to out-count these, use

=COUNTA('!sheet2!'B1:B90)-COUNT('!sheet2!'B1:B90)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks, Bob - works fine now!
Bob Phillips said:
You could try

=COUNTA('!sheet2!'B1:B90)

which will count numbers as well. If you want to out-count these, use

=COUNTA('!sheet2!'B1:B90)-COUNT('!sheet2!'B1:B90)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Hi Bob,
Cant understand how that works. Shouldn't it be:
=COUNTA(Sheet2!B1:B90)?
=COUNTA('!sheet2!'B1:B90) gives me a error.
Silvabod says it works! I'm at a loss, can you enlighten me please?
Regards,
Alan.
 
Alan wrote...
Hi Bob,
Cant understand how that works. Shouldn't it be:
=COUNTA(Sheet2!B1:B90)?
=COUNTA('!sheet2!'B1:B90) gives me a error.
Silvabod says it works! I'm at a loss, can you enlighten me please?
....

Silvabod probably fixed Bob's typos.

There's a simpler way to count cells containing text.

=COUNTIF(Sheet2!B1:B90,"*")
 
And, to count only text and *exclude* zero length strings ( "" - nulls), try
this:

=COUNTIF(Sheet2!B1:B90,"*?")

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
RagDyer wrote...
And, to count only text and *exclude* zero length strings ( "" - nulls), try
this:

=COUNTIF(Sheet2!B1:B90,"*?")
....

Why not use =COUNTBLANK(Sheet2!B1:B90) instead?
 

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

Back
Top