• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

need a formula to exclude negatives

Jellyroll1970

New Member
Basic formula - =SUM(C7-D7)...ok easily accomplished but I don't want a negative number to show up. If the sum D7 from C7 is less than 0 it should go no lower than 0.
 
sorry, I think you are saying that fi C7 > D7 then 0


ok try this


=if(Sum(C7-D7)<0,0,Sum(C7-D7))
 
You don't need the Sum to do the maths, try

=if(C7-D7<0,0,C7-D7)

Code:

or to simplify even more

=(D7<C7)*(C7-D7)
 
Back
Top