ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Coutnif (https://www.excelbanter.com/excel-worksheet-functions/204165-coutnif.html)

Matt

Coutnif
 
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.

Fred Smith[_4_]

Coutnif
 
Countif can handle only one condition. For multiple conditions, use
Sumproduct, as in:

=sumproduct(--(a1:a5="X"),--(b1:b50))

Regards,
Fred.

"Matt" wrote in message
...
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.



Sean Timmons

Coutnif
 
=sumproduct(--($A$2:$A$100="X"),--($B$2:$B$1000))

"Matt" wrote:

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.


T. Valko

Coutnif
 
If you're using Excel 2007:

=COUNTIFS(A1:A4,"x",B1:B4,"0")

--
Biff
Microsoft Excel MVP


"Matt" wrote in message
...
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.




ShaneDevenshire

Coutnif
 
Hi,

And here are two old school formulas:

=SUMPRODUCT((A2:A5="X")*(B2:B50))
=SUM((A2:A5="X")*(B2:B50)) this one array entered (Shift+Ctrl+Enter)

--
Thanks,
Shane Devenshire


"Matt" wrote:

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.



All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com