Formula format for Count or Countif funtion with two criterias

D

Debi

What would be the formula specifics when I want to use the count or countif
funtion with two criteria. Example:
Count A1:A5 and c1:c5
countif A1:A5 equals f and D1:D5 equals h
Countif A1:A5 equals f and count D1:D5
 
D

David Billigmeier

=COUNT(A1:A5)+COUNT(C1:C5)
=SUMPRODUCT(--(A1:A5="f"),--(D1:D5="h"))
=SUMPRODUCT(--(A1:A5="f"),--(D1:D5<>""))
 
M

Myrna Larson

For COUNT, you can use a single formula, as it accepts multiple ranges, i.e.

=COUNT(A1:A5,C1:C5)
 
Top