ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif a corresponding value is not equal to zero or blank (https://www.excelbanter.com/excel-worksheet-functions/182553-countif-corresponding-value-not-equal-zero-blank.html)

raphiel2063

Countif a corresponding value is not equal to zero or blank
 
I want to use countif to count the number of entries in a big list. However,
I want to count the number of times an entry appears but only if the column
next to it is not equal to zero of blank.

E.g.
Qty
Apple 1
Banana 0
Apple 0
Apple 6
Banana 3

I would like to be able to use countif to sum up the number of times apple
appears when the qty is greater than zero (or blank) so in this case it would
be 2, not 3 as one entry is 0.

Can you help?

Teethless mama

Countif a corresponding value is not equal to zero or blank
 
=SUMPRODUCT((A1:A100="Apple")*(B1:B1000))

"raphiel2063" wrote:

I want to use countif to count the number of entries in a big list. However,
I want to count the number of times an entry appears but only if the column
next to it is not equal to zero of blank.

E.g.
Qty
Apple 1
Banana 0
Apple 0
Apple 6
Banana 3

I would like to be able to use countif to sum up the number of times apple
appears when the qty is greater than zero (or blank) so in this case it would
be 2, not 3 as one entry is 0.

Can you help?



All times are GMT +1. The time now is 11:34 AM.

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