COUNTIF Question

P

Phillycheese5

I need a formula that does the following: count the number of "APPLES"
in the range B1:B5 when the corresponding value in the range A1:A5 is
positive. In this case the answer should be 3.

I have data set up like this in column A and B:

+100 APPLES
+150 APPLES
+200 ORANGES
+250 APPLES
-100 APPLES

Thanks,
Phillycheese
 
D

Domenic

Try...

=SUMPRODUCT(--(A1:A5>0),--(B1:B5="Apples"))

Hope this helps!

Phillycheese5
 
B

BenjieLop

Phillycheese5 said:
I need a formula that does the following: count the number of "APPLES
in the range B1:B5 when the corresponding value in the range A1:A5 i
positive. In this case the answer should be 3.

I have data set up like this in column A and B:

+100 APPLES
+150 APPLES
+200 ORANGES
+250 APPLES
-100 APPLES

Thanks,
Phillycheese

=SUMPRODUCT((B1:B5=\"APPLES\")*(A1:A5>0)

is your formula.

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top