If Statement

  • Thread starter Thread starter serviceenvoy
  • Start date Start date
S

serviceenvoy

I have created the following if statement and can't seem to get the
calculation to come out right. Am I overlooking something simple
here?

=([totallaborcost]>0,([totallaborCost]+50),0)

Here is the logic I'm trying to incorporate
If "totallaborcost" is greater than 0, then "totallaborcost+50, if not
then 0
 
What you are overlooking is the Iif function in your expression:

=Iif([totallaborcost]>0,([totallaborCost]+50),0)

HTH,

Rob
 
I have created the following if statement and can't seem to get the
calculation to come out right. Am I overlooking something simple
here?

=([totallaborcost]>0,([totallaborCost]+50),0)

Here is the logic I'm trying to incorporate
If "totallaborcost" is greater than 0, then "totallaborcost+50, if not
then 0

try to use Nz() while evaluating the [totallaborcost] and put iif in
front of the whole expression:

=iif(nz([totallaborcost])>0,(nz([totallaborCost])+50),0)
 
Back
Top