If difference is 0 or below how do show just 0

  • Thread starter Thread starter websitejack
  • Start date Start date
W

websitejack

I'm not sure how to set this up?

=(D21-B13)+(A5-B12)

I only want to add the difference of (A5-B12) to (D21-B13) if it is
positive number so if the difference is 0 or below how do I get it t
just show 0?

thanks for your help.

jac
 
Hi Jack,

-IF((D21-B13)+(A5-B12)>0,(D21-B13)+(A5-B12),0)


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Jack,

Use an IF function as follows:-

=IF((D21-B13)+(A5-B12)>0,(D21-B13)+(A5-B12),0)

This statement works like this - IF the result of your formula i
greater than zero then excel performs the formula if the result i
anything else ie zero or a negative number then the result is shown a
zero

Joh
 
jack

If I am interpreting this correctly........

=IF(A5-B12<=0,0,(D21-B13)+(A5-B12))

Gord Dibben Excel MVP
 
Back
Top