G Guest Aug 31, 2006 #1 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.
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.
R Rick Brandt Aug 31, 2006 #2 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. Click to expand... =IIf(YourCurrentExpression < 0, 0, YourCurrentExpression)
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. Click to expand... =IIf(YourCurrentExpression < 0, 0, YourCurrentExpression)
G Guest Aug 31, 2006 #3 =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.
=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.
G Guest Aug 31, 2006 #4 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) Click to expand... Click to expand...
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) Click to expand... Click to expand...