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 are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

AAE

New Member
Joined
Feb 19, 2007
Messages
31
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
 

somanyqs

Board Regular
Joined
Oct 2, 2007
Messages
76
Doesn't the above create an "AND", so the function is C>0 AND D>0?
(rather than C>0 or D>0)?
Thanks -
 

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
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))
 

somanyqs

Board Regular
Joined
Oct 2, 2007
Messages
76
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-
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,492
Messages
5,837,668
Members
430,509
Latest member
steve85215

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
Top