Help with a numbers sumif or sumifs formula

I cannot seem to get a sumif or sumifs formula to work. I want to sum two cells and if the answer will be a negative, I want a zero return. I use the "<0", 0 condition. I do get a Zero. but if the sum of the two cells = a positive number or zero, then I want the formula to return a zero or the positive number. I cannot get a formula to do this. I get an error which says I'm putting in too may arguments or the syntax is wrong. Help, anyone?

MacBook Pro, macOS High Sierra (10.13.3), numbers 4.3.1

Posted on Feb 19, 2018 6:21 PM

Reply
4 replies

Feb 19, 2018 10:10 PM in response to geraldmac

Hi Gerald,


SUMIF and SUMIFS are not appropriate to this task. The IF(S) in those function names refer to conditions determining whether an amount will be included in the sum or not, not to what to do if the result is a particular value or in a particular range.


The IF that you could use here is IF itself.


IF(SUM(B2:C2)<0,0,SUM(B2:C2)

In words: If the sum of the value in B2 and C2 is less than zero, the result is 0, otherwise, the result is the sum of the values in B2 and C2.


SG's MAX(0,SUM(B2:C2) gives the same result using a different logic and a simpler formula.

In words, it says: Take the greatest value from these choices: 0, SUM(B2:C2)


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Help with a numbers sumif or sumifs formula

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.