ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Variations on Sumif (https://www.excelbanter.com/excel-worksheet-functions/140036-variations-sumif.html)

EG

Variations on Sumif
 
Sumif allows you to add numbers in a column IF another cell in the same row
meets a certain criteria.

Question: Can I do this calculation if I have two sets of criteria instead
of just one?

For example:
E14 = Sell, I14 = Call, J14 = 2
E15 = Buy, I15 = Put, J15 = 3
E16 = Sell, I16 = Put, J16 = 4
E17 = Sell, I17 = Call, J17 = 2

I want to add the values in Column J whose same row E value is "sell" and
whose same row I value is "Call". In this case it would be 2+2.

Is this possible??

Thanks,

EG




Mike

Variations on Sumif
 
try this
=SUM(IF($E$14:$E$17="sell",IF($I$14:$I$17="call",$ J$14:$J$17,0),0))

after you paste into cell press ctrl + shift + enter

"EG" wrote:

Sumif allows you to add numbers in a column IF another cell in the same row
meets a certain criteria.

Question: Can I do this calculation if I have two sets of criteria instead
of just one?

For example:
E14 = Sell, I14 = Call, J14 = 2
E15 = Buy, I15 = Put, J15 = 3
E16 = Sell, I16 = Put, J16 = 4
E17 = Sell, I17 = Call, J17 = 2

I want to add the values in Column J whose same row E value is "sell" and
whose same row I value is "Call". In this case it would be 2+2.

Is this possible??

Thanks,

EG




EG

Variations on Sumif
 
Great. I will try it. What does pressing Ctrl + Shift + Enter do?

"Mike" wrote:

try this
=SUM(IF($E$14:$E$17="sell",IF($I$14:$I$17="call",$ J$14:$J$17,0),0))

after you paste into cell press ctrl + shift + enter

"EG" wrote:

Sumif allows you to add numbers in a column IF another cell in the same row
meets a certain criteria.

Question: Can I do this calculation if I have two sets of criteria instead
of just one?

For example:
E14 = Sell, I14 = Call, J14 = 2
E15 = Buy, I15 = Put, J15 = 3
E16 = Sell, I16 = Put, J16 = 4
E17 = Sell, I17 = Call, J17 = 2

I want to add the values in Column J whose same row E value is "sell" and
whose same row I value is "Call". In this case it would be 2+2.

Is this possible??

Thanks,

EG




Teethless mama

Variations on Sumif
 
=SUMPRODUCT(--(E14:E17="Sell"),--(I14:I17="Call"),J14:J17)


"EG" wrote:

Sumif allows you to add numbers in a column IF another cell in the same row
meets a certain criteria.

Question: Can I do this calculation if I have two sets of criteria instead
of just one?

For example:
E14 = Sell, I14 = Call, J14 = 2
E15 = Buy, I15 = Put, J15 = 3
E16 = Sell, I16 = Put, J16 = 4
E17 = Sell, I17 = Call, J17 = 2

I want to add the values in Column J whose same row E value is "sell" and
whose same row I value is "Call". In this case it would be 2+2.

Is this possible??

Thanks,

EG





All times are GMT +1. The time now is 08:10 PM.

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