Click to See Complete Forum and Search --> : Formula Needed please


thadoc35
May 28th, 2009, 11:51 AM
I am trying to do a simple A - B formula, however I noticed that there are negative numbers involved.
Is there a way to have {statA} - {statB} but if {statB} is a negative number then it zeros the whole calculation.

I hope I have explained this right, any help would be appreciated


Example

6 - 2 = 4 OK
6 - -2 = 8 NOT OK
6 - -2 = 0 OK

jggtz
May 28th, 2009, 03:29 PM
If {statB}<0 Then 0 Else {statA}-{statB}

thadoc35
May 28th, 2009, 05:28 PM
would a <= hurt? because if the initial number is zero I want to basically void that field.

Thank you for the help

jggtz
May 28th, 2009, 10:20 PM
Then

If {statB}<=0 Then 0 Else {statA}-{statB}