CountIF on 2 arguments

D

david.maddern

How do you COUNTIF on 2 arguments. ie I want to count the
number of values "x" in column A only if column B's value
= "y".

I have seen many ref to SUMPRODUCT but I am not counting
numbers.

Thanks in advance for any assistance.

David Maddern
 
F

Frank Kabel

Hi
no problem using SUMPRODUCT. Try
=SUMPRODUCT((A1:A100="x")*(B1:B100="y"))

or
=SUMPRODUCT(--(A1:A100="x"),--(B1:B100="y"))
 
T

Trevor Shuttleworth

David

=SUMPRODUCT((A1:A10="x")*(B1:B10="y"))

Adjust ranges to meet your needs ... both must have the same number of cells

Regards

Trevor
 
Top