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-
 

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-
 

Forum statistics

Threads
1,082,287
Messages
5,364,299
Members
400,787
Latest member
bs04c

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top