V-lookup and Countif

T

thm

I'm trying to create a formula that will look up criteria in one column and
count the result of another column. Here is some data as an example:

Fruit Have in Stock
Orange X
Pear X
Apple
Orange X
Orange
Apple X

I'm trying to create a formula that looks up "Orange" in column A and then
counts the number of "X" in column b to return a results. So my result for
Oranges should be 2 because out of the 3 listed only 2 have an "X" marked
next to it.
 
M

Mike H

Hi,

Try this

=SUMPRODUCT((A1:A10="Orange")*(B1:B10="X"))

In practice use cell references for the criteria

=SUMPRODUCT((A1:A10=C1B1:B10=D1))

Mike
 

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