SUMIFS (Memory blackout)

indygo

Board Regular
Joined
Dec 2, 2013
Messages
126
Office Version
  1. 365
Platform
  1. Windows
Hi,

I need help with SUMIFS or equivalent option in excel.
There are two conditions. I want to sum total from D and E IF it's not 0 and IF A and B has W or L.

So result from the one below should be 30.

Previously I had this: =SUM(SUMIF(range,{"<0",">0"}))
But I want to add to requirement of A and B.... so it only sums the ones with W or L.


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]W[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"][/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD="align: center"]L[/TD]
[TD="align: center"]W[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]W[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]N/A[/TD]
[TD="align: center"]N/A[/TD]
[TD="align: center"][/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD="align: center"]N/A[/TD]
[TD="align: center"]N/A[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]W[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"][/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD="align: center"]L[/TD]
[TD="align: center"]W[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]0[/TD]
[/TR]
</tbody>[/TABLE]


Thanks
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
So in the given example, what is your expected result?

The criteria of Not 0 is not necessary, because if you include 0 in the sum, it has no effect on the result..

Try this, which would result in 30 if that table is at the very top left of your sheet.

=SUM(SUMIF(A1:B10,{"W","L"},D1:E10))
 
Upvote 0
Try:
Code:
=SUMPRODUCT((--($A$1:$A$10="W")+--($A$1:$A$10="L")+--($B$1:$B$10="W")+--($B$1:$B$10="L")),$D$1:$D$10,$E$1:$E$10)
@Jonmo1 mine returns 150, suspect I've misunderstood requirement
 
Last edited:
Upvote 0
Result in given example should be 30 not 150. First solution is working fine for me.

Thank you both for help.
 
Upvote 0
You're welcome.

Just to be clear on what it's doing..
If A is W or L, it sums D
If B is W or L, it sums E

So if you had a case where
A=W
B=N/A
D=5
E=5

It would only sum 5 (from D)
 
Last edited:
Upvote 0
Yes thanks,

In my file there A and B are always together if A is empty B will always be empty too so in this case it's accurate.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top