How put "> or <" a variable into multiconditional SUMIFS

somanyqs

Board Regular
Joined
Oct 2, 2007
Messages
76
Picking up on an old thread (apologies if I was supposed to just tack onto the old one)

Trying to find sum of the values in Column A for a March sale (indicated in Column B) if the cell in Column C is >0 OR the cell in Column D is >0, and Column E is >10.

I think it would be something like this...
=SUM(SUMIFS(A:A,B:B,"="&"March",OR(C:C,">"&0,D:D,">"&0),E:E,">"&10))

Though I don't think I am handling the "OR" correctly.

Thanks everyone-
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You don't need to use SUM(SUMIFS)), just use the SUMIFS

=SUMIFS(B1:B100,"March",C1:C100,">0",D1:D100,">0"), etc.

See the Excel Help to understand the syntax and arguments
 
Upvote 0
Doesn't the above create an "AND", so the function is C>0 AND D>0?
(rather than C>0 or D>0)?
Thanks -
 
Upvote 0
Doesn't the above create an "AND", so the function is C>0 AND D>0?
(rather than C>0 or D>0)?
Thanks -

You are correct..
Doing OR conditional counts/sums is tricky.

I would recommend using a helper column to do the or, then use that column in the SUMIF
Say in column F put =OR(C1>0,D1>0) and fill down
Then use

=SUMIFS(A:A,B:B,"March",F:F,TRUE,E:E,">"&10))
 
Upvote 0
Ahh, just what I did. I was thinking there might be something more elegant than my workaround ;)
Did the same for the MEDIAN(IF) and AVERAGEIFS

Thanks for confirming my decision! Much appreciated-
 
Upvote 0

Forum statistics

Threads
1,214,556
Messages
6,120,190
Members
448,949
Latest member
keycalinc

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