Sumifs with multiple criteria and OR statement

rcocrane99

New Member
Joined
May 9, 2024
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Hello, Im looking to add multiple values with variating criteria where there are 3 catagories, 2 locations and 5 sources example below.
The primary and secondary i have been able to complete but the other is giving me some difficulty
=sumifs(D:D,A:A,H6,C:C, Location 1 or 2,B:B,OR("D","E","F"))

1719330926878.png
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Please try

=sumifs(D:D, A:A,H6, C:C, OR(right(I4,1)*1,right(L4,1)*1), B:B,OR("D","E","F"))
sorry its a little confusing posting an example and not the exact thing, my actual formula is =SUMIFS($D:$D,$A:$A,H36,$C:$C,"HP",$B:$B,OR("Other","JC","RCG")) where HP is a location and Other, JC and RCG are different sources in my other category, specifically the OR statement isnt working as a criteria and im undsure why
 
Upvote 0
try this:
Edited to reflect your exact formula, except for column range lengths:

Book1
ABCDHI
35Crit1ColumnCrit3ColumnCrit2ColumnSumColumnCrit1Result:
362OtherHP20349
373JCLocation 216
383GHP30
391JCLocation 323
401RCGHP16
411JCHP28
423RCGHP30
431RCGLocation 219
442GLocation 129
451OtherHP30
463RCGHP19
472GHP21
482JCHP19
493OtherLocation 124
503JCLocation 328
Sheet1
Cell Formulas
RangeFormula
I36I36=SUMPRODUCT(($D$36:$D$50)* ($A$36:$A$50=$H$36)* (($C$36:$C$50="HP"))* (($B$36:$B$50="Other")+($B$36:$B$50="RCG")+($B$36:$B$50="JC")))
 
Last edited:
Upvote 0
How about
Excel Formula:
=sum(SUMIFS($D:$D,$A:$A,H36,$C:$C,"HP",$B:$B,{"Other","JC","RCG"}))
 
Upvote 0
Solution
that works! thank you, may i ask why the{} instead of () and what does having the sum function surrounding it all do for this? also why was my original formula not working?
 
Upvote 0
The {} makes it an array & the sum is needed to sum all the results from the array.
Your formula didn't work as you cannot use OR like that.
 
Upvote 1

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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