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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

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-
 

Watch MrExcel Video

Forum statistics

Threads
1,129,593
Messages
5,637,294
Members
416,963
Latest member
zazama

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