countif

  • Thread starter Thread starter Tom G
  • Start date Start date
T

Tom G

I am trying to use this formula

=COUNTIF(H54_,"0")

when the value of another cell (CLASS) = 7

any suggestions?
 
Hi Tom
not quite sure what you're trying to achieve. Do you want to have a
variable range as first parameter?
 
Hi Frank,

I want to run =COUNTIF(a1:a20,"0") but only for cases where b:b = 7.

Thanks

Tom
 
Hi Tom
so you want to count all zeors in column A but only if the
corresponding cell in column B = 7. If yes use
=SUMPRODUCT((A1:A20=0)*(B1:B20=7))

assuming that the zero is a number and not a text entry
 
Frank,

Here is an example:

A B
1 1 2
2 1 2
3 1 2
4 1 3
5 1 3
6 1 3

your example says:

=SUMPRODUCT(A1:A6=1)*(B1:B6=2)


I am looking to find all occurences of 1 in column A, only when b=2, the
result should be 3 (i.e., a1+a2+a3).

Thanks.

tom
 
Back
Top