countif

P

play01

=AND(COUNTIF(A1:A5,"HM"))*(COUNTIF(B1:B5,"5"))
Trying to calculate the following:
A B
1 HM 5
2 HM 2
3 HM 4
4 HG 5
5 HM 5

Count the number of times "HM" is in column A and "5" is in column B.

Thanks for the help.
Tod
 
D

daddylonglegs

Try this

=SUMPRODUCT(--(A1:A5="HM"),--(B1:B5=5))

If the 5 is text not numeric then use "5" instea
 
Top