How to do a summary count?

  • Thread starter Thread starter perryche
  • Start date Start date
P

perryche

I am not familiar with this process, but how do one do a summary count
of a column? i.e. how many "1" is column A, how many "2"s, "3"s...

Column A
1
2
3
1
2
3
5
6
3
2
1

Ans: 3 "1"s, 3 "2"s...

I know I can use IIF (...) but, I don't want to do a long long code
for adding up each cell!! Thanks.

Perry
 
Hi Perry

=COUNTIF(A:A,1) for the number of 1's
=COUNTIF(A:A,2) for 2's

Or in B1:B1 enter 1,2,3,4,5
and in C1 enter
=COUNTIF(A:A,B1)
and copy down
 
That's great, what if the field is a string? instead of number? Does
Countif works?

Perry
 
How about if two fields criteria need to match?

e.g.

=countif(A:A, 1 & B:B,"ABC")

Obviously this is a wrong code. How do I get around that?

Thanks,
Perry
 
I ran across =SUMPRODUCT((General!C:C=1)*(General!E:E="X")) function,
but it yields "#Num!" error. What am I missing?

Perry
 
Nevermind, I figured it out... basically, the entire column might be
too much info to calculate. So, I used C2:C100 instead, and it works.

Thanks anyway.
Perry
 
Back
Top