Coutnif

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

I need help with a countif statement. I have information like the following:

A B
X 1
Y 1
X 2
X 0

I need to count how many times X in column A is greater than zero in column B.
 
Countif can handle only one condition. For multiple conditions, use
Sumproduct, as in:

=sumproduct(--(a1:a5="X"),--(b1:b5>0))

Regards,
Fred.
 
Hi,

And here are two old school formulas:

=SUMPRODUCT((A2:A5="X")*(B2:B5>0))
=SUM((A2:A5="X")*(B2:B5>0)) this one array entered (Shift+Ctrl+Enter)
 
Back
Top