How to Count Text Occurrences in a Column??

J

JW

I'm using Excel 2002. I have a large spreadsheet containing columns of
letters, a through e, representing answers to a multiple choice quiz. I want
to count the number of "a's", "b's", "c's", etc in each column. I thought I
could do that using the "count" function, but I'm not getting there. I would
appreciate any suggestions on how to accomplish that. Thanks for your help.
 
D

Dave Peterson

=countif(a1:a10,"A")
I'm using Excel 2002. I have a large spreadsheet containing columns of
letters, a through e, representing answers to a multiple choice quiz. I want
to count the number of "a's", "b's", "c's", etc in each column. I thought I
could do that using the "count" function, but I'm not getting there. I would
appreciate any suggestions on how to accomplish that. Thanks for your help.
 
J

JW

"countif" !!! - Thanks, I should have found that. I appreciate your help, it
works great.
 
K

Ken Johnson

What if there were multiple text choices you wanted to count - would you
need separate Countif's for each?

=COUNTIF(A1:A10,"A")+COUNTIF(A1:A10,"B")
or
=SUMPRODUCT((A1:A10="A")+(A1:A10="B"))
will count As and Bs

Ken Johnson
 
D

Dave Peterson

If you wanted a separate count of each, then yes.

But if you wanted to count all the A's, B's and C's, you could also use:
=sum(countif(a1:a10,{"A","B","C"}))
 
P

Paul Hyett

If you wanted a separate count of each, then yes.

That's what I was afraid of - thanks anyway.
But if you wanted to count all the A's, B's and C's, you could also use:
=sum(countif(a1:a10,{"A","B","C"}))

This might be of some use, though.
 

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