If a value is negative how to make it equal 0

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I do a calculation between two fields and the answer ends up to be
negative how do I make the negative number equal 0.
 
Marc said:
If I do a calculation between two fields and the answer ends up to be
negative how do I make the negative number equal 0.

=IIf(YourCurrentExpression < 0, 0, YourCurrentExpression)
 
=IIF([Finished Date Man BR by QA]-[Packaging Date]<0,0 [Finished Date Man BR
by QA]-[Packaging Date])

Is above how I'm suppose to write it? It give me an error "you may have
entered a comma without a preceeding value identifier" Thanks for your help.
 
You are just missing a comma. The construct for an IIf statement is
IIf(condition, True Value, False Value)

=IIF([Finished Date Man BR by QA]-[Packaging Date]<0, 0, [Finished Date Man
BR
by QA]-[Packaging Date])


Marc said:
=IIF([Finished Date Man BR by QA]-[Packaging Date]<0,0 [Finished Date Man BR
by QA]-[Packaging Date])

Is above how I'm suppose to write it? It give me an error "you may have
entered a comma without a preceeding value identifier" Thanks for your help.

Rick Brandt said:
=IIf(YourCurrentExpression < 0, 0, YourCurrentExpression)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top