multiple selections in a sumif functions

G

Guest

Can someone please help me with the following problem as a whole day of
surfing over the internet did not help:

I want to make a selection that when column A is cost and column B is apple
that the answer is 80 (sum of column C) as in the spreadsheet below:
A B C
cost apple 10
cost tomato 20
revenue apple 50
revenue tomato 30
cost apple 30
revenue tomato 20
cost tomato 10
cost apple 40

Your help is much appreciated!

Best regards,

Frank
 
B

Bob Phillips

=SUMPRODUCT(--(A1:A20="cost"),--(B1:B20="apple"),C1:C20)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

Frank,

Copy the below formula exactly like it is (including dashes --) in whatever
cell you want the answer. I am assuming your data is in cells A2:C9.
Therefore, you may have to change the data ranges.

=SUMPRODUCT(--(A2:A9="cost"),--(B2:B9="apple"),C2:C9)

This should produce the answer of 80 that you are looking for.

Hope this helps.

Bill Horton
 

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