=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
Trevor Shuttleworth - 20 Mar 2006 17:46 GMT
Todd
=SUMPRODUCT((A1:A5="HM")*(B1:B5=5))
Regards
Trevor
> =AND(COUNTIF(A1:A5,"HM"))*(COUNTIF(B1:B5,"5"))
> Trying to calculate the following:
[quoted text clipped - 9 lines]
> Thanks for the help.
> Todd
daddylonglegs - 20 Mar 2006 17:51 GMT
Try this
=SUMPRODUCT(--(A1:A5="HM"),--(B1:B5=5))
If the 5 is text not numeric then use "5" instea