Conditional Countif

G

Guest

I am trying to check two conditions in one worksheet and if true report in
another. So for example in worksheet "ABC" I want to count !B1:!B20 if it
equals "apples" and !C1:!C20 if it equals "oranges". If both conditions are
true I want to return 1 to the answer in worksheet "XYZ".
Thanks
 
P

Peo Sjoblom

=SUMPRODUCT(--(B1:B20="apples"),--(C1:C20="oranges"))

replace the hardcoded values with cell references when you can put the
criteria
that way you don't need to edit the formula if you change the criteria
 

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

Similar Threads


Top