Need help with Sumifs and or Combination...excel formula:

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, current formula:
'=SUMIFS($D$1:$D$27,$B$1:$B$27,"May",$C$1:$C$27,OR("FEC","ORANGE"))

I want to sum col D if col c either has "FEC" or "Orange"
and month is May in Col B.

Thanks for the Advice.
 

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
Assuming column B has the months as text (not formatted dates) try

=SUM(SUMIFS($D$1:$D$27,$B$1:$B$27,"May",$C$1:$C$27,{"FEC","ORANGE"}))
 
Upvote 0
Hi,

Maybe

=SUMPRODUCT(--(B1:B27="May"), --(((C1:C27="FEC")+(C1:C27="ORANGE"))>0),D1:D27)

HTH

M.
 
Last edited:
Upvote 0
Sorry to bring this up again but I want to know how to achieve this along with the current formula...
if col A = or("NY","LA","GA")

Can this condition be added to current formula?

Thanks again guys!
 
Upvote 0
In my formula add this condition

--(((A1:A27="NY")+(A1:A27="LA")+(A1:A27)="GA"))>0)

M.
 
Upvote 0
Within my suggestion you can do this

=SUM(SUMIFS($D$1:$D$27,$B$1:$B$27,"May",$C$1:$C$27,{"FEC","ORANGE"},$A$1:$A$27,{"NY";"LA";"GA"}))

Note that with two "array constants" one has to use comma separators, one has to use semi-colons. If you wanted a third then that would be problematic using that syntax - another approach which is more easily extendable to large numbers of "OR"s is to use SUMPRODUCT with ISNUMBER(MATCH, i.e.

=SUMPRODUCT($D$1:$D$27,($B$1:$B$27="May")*ISNUMBER(MATCH($C$1:$C$27,{"FEC","ORANGE"},0)*MATCH($A$1:$A$27,{"NY","LA","GA"},0)))

In that setup the separators can be commas or semi-colons, it doesn't matter which (as long as you are consistent within each part).
 
Upvote 0
'=SUMPRODUCT(--(B1:B27="May"),--(((C1:C27="FEC")+(C1:C27="ORANGE"))>0),--(((A1:A27="NY")+(A1:A27="LA")+(A1:A27)="GA"))>0),D1:D27)

Barcelo, thanks....I tried this way and it error, how exactly do i organise this formula?
Thanks again for helping.
 
Upvote 0
Sorry, i think it has to be this way...
'=SUMPRODUCT(--(B1:B27="May"),--(((C1:C27="FEC")+(C1:C27="ORANGE"))>0),--(((A1:A27="NY")+(A1:A27="LA")+(A1:A27="GA"))>0),D1:D27)
I think misplaced the brackets...:)
 
Upvote 0

Forum statistics

Threads
1,223,277
Messages
6,171,156
Members
452,385
Latest member
Dottj

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