SUM, COUNTIF?

  • Thread starter Thread starter Emma
  • Start date Start date
E

Emma

Hi. I'm trying to have a cell return the number of times
a number occurs in a column. Here's what I have so far:
=SUM(COUNTIF(C3,InvRev!$B$2:$B$53))

Clearly I don't know what I'm doing here because although
the first number (in C3) occurs five times in column B,
I'm getting a result of 1.

Thanks in advance for your help.
 
Emma

close, but you've got the parameters the wrong way round (and you don't need
the sum)

=COUNTIF(InvRev!$B$2:$B$53,C3)

Regards

Trevor
 
Just the wrong way around Emma, and you don't need SUM as COUNTIF counts the
occurrences.

=COUNTIF(InvRev!$B$2:$B$53,C3)
 
-----Original Message-----
Hi. I'm trying to have a cell return the number of times
a number occurs in a column. Here's what I have so far:
=SUM(COUNTIF(C3,InvRev!$B$2:$B$53))

Clearly I don't know what I'm doing here because although
the first number (in C3) occurs five times in column B,
I'm getting a result of 1.

Thanks in advance for your help.
.
Emma,

You don't need the SUM part of that statement.

COUNTIF(Range,ComparisonValue) will give you a total.
E.g. =COUNTIF(C2:C27,5) will count the number of 5's in
the range of cells from C2 - C27. I think you got the
parameters backwards in your formula. Your search range
is only one cell big (C3).

Ann
 
Back
Top