Countif

  • Thread starter Thread starter Russ
  • Start date Start date
R

Russ

I am trying to figure out how to do a CountIf on text
cells. Example:
A1 = hound
A2 = terrier
A3 = german
A4 = hound
A5 = german

In cell A6 I want it to give me the count for how many
times "hound" was in A1:A5 (twice).
I try =CountIf(A1:A5,"hound") but I get an error. This
command seems to work for numbers...

Thanks for your help.
Russ
 
Russ

Should work as written.

Perhaps an extra space or something in the cell(s)?

Have you tried "Clear Contents" and re-typed the text?

Try the TRIM or CLEAN Function in a helper column.

Gord Dibben Excel MVP
 
Thanks to both of you that responded. I must have had a
typo or extra space because after reading your replies I
tried again with a clean slate and it worked fine. Thanks
again.

Russ
 
Russ wrote..
I am trying to figure out how to do a CountIf on text cells. Example
A1 = houn
A2 = terrie
A3 = germa
A4 = houn
A5 = germa
In cell A6 I want it to give me the count for how many time "hound
was in A1:A5 (twice). I try =CountIf(A1:A5,"hound") but I get a
error
..

What error? An error value like #REF!? If so, make absolutely clea
you don't have a typo in the first argument. The wrong result, mayb
1 or 0? If so, the odds are you have stray trailing spaces in A1 o
A4. What doe

=COUNTIF(A1:A5,"*hound*"

return
 

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

Similar Threads


Back
Top