SUMIFS with OR statement

bluegold

Active Member
Joined
Jun 21, 2009
Messages
279
Hi guys, this one got me stumped as well :confused:

=SUMIFS(Football!AM:AM,Football!D:D,">="&$B$1,Football!D:D,"<="&$C$1,Football!A:A,">="&$F$1,Football!A:A,"<="&$G$1,Football!AO:AO,"<>nd")

How would I modify the above formula to include the following two statements?

Football!I:I,">1" OR Football!I:I,">0.05 AND < 1"

So I want all of the criteria from the original formula to stand but filter data from either of the additional 2 criteria
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I think I posted on a similar question you had the other day. If you're wanting to do any kind of OR with a SUMIFS, you need to use arrays and a SUM and an IF separately. The following should work, pressing CONTROL+SHIFT+ENTER instead of just enter:

=SUM(IF((Football!D:D>=$B$1)*(Football!D:D<=$C$1)*(Football!A:A>=$F$1)*(Football!A:A<=$G$1)*(Football!AO:AO<>"nd")*((Football!I:I>1)+(Football!I:I>0.05)*(Football!I:I<1)),Football!AM:AM))

Basically, a multiplication of arrays is an AND, and an addition of arrays is an OR. This formula does all the arithmetic with the arrays, and then everywhere there's a TRUE in the resulting array, the corresponding result in Football!AM:AM will stay as its value. Everywhere that's a FALSE, the corresponding result in Football!AM:AM will also be a FALSE. Summing the resulting Football!AM:AM array will then ignore all the FALSEs. Hope this makes sense.
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,603
Members
452,658
Latest member
GStorm

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