Sumif(s) with OR criteria in multiple columns

CRHAAG

New Member
Joined
Jul 3, 2014
Messages
46
Hi everyone. I am trying to write a SUMIF() formula that pulls in a total from one column if either one of two other columns is greater than zero.

Value1Value2Value3
50001000
02002000
1001005000
004000

So my psuedo code would be:

If value1>0 OR value2>0 SUM Value3

So I would expect the answer in this case to be 8000.

Any insight would be appreciated
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
If your values2 can never be negative, then you can use this:
=SUMPRODUCT(--(A2:A5+B2:B5>0),--(C2:C5))
 
Upvote 0
Joe4 that seems to do the trick. I've never seen that format before. Can you tell me what it is/how it works?
 
Upvote 0
SUMPRODUCT is what we used to use before COUNTIFS and SUMIFS came along (it allows you to do multiple conditions). It can also do some of the more complex one that you cannot easily do with COUNTIF/COUNTIFS or SUMIF/SUMIFS. The double negative signs is just used to coerce the equalities (or inequalities) to numeric values (I actually did not need to use it on the second argument).

Here are some links that show you how to use it:
 
Upvote 0

Forum statistics

Threads
1,215,040
Messages
6,122,806
Members
449,095
Latest member
m_smith_solihull

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