ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   multiple selections in a sumif functions (https://www.excelbanter.com/excel-worksheet-functions/52147-multiple-selections-sumif-functions.html)

Frank

multiple selections in a sumif functions
 
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



Bob Phillips

multiple selections in a sumif functions
 
=SUMPRODUCT(--(A1:A20="cost"),--(B1:B20="apple"),C1:C20)

--

HTH

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


"Frank" wrote in message
...
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





William Horton

multiple selections in a sumif functions
 
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

"Frank" wrote:

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




All times are GMT +1. The time now is 02:55 PM.

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