SteveL13
asked on
IIf syntax question
What is wrong with...
=IIf([txtTotalPartNdemand] -([txtWIPq tyAM]+[txt FGqty]+[tx tTotWHqty] )<0,0,[txt TotalPartN demand]-([ txtWIPqtyA M]+[txtFGq ty]+[txtTo tWHqty])
--Steve
=IIf([txtTotalPartNdemand]
--Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...or perhaps you could first explain what happens when you run it...?
Steve ... the IIF did not compile until I added a trailing right Paren ...
mx
mx
IIF Syntax helper:
IIF(True, TruePart, FalsePart)
Having another IIF for TruePart, copy the whole and replace TruPart.
IIF(True, IIF(True, TruePart, FalsePart), FalsePart)
Fill your real values: ex:
IIF(x=2, IIF(y=3, 10, 20), 3)
Having another IIF for FalsePart, copy the whole and replace FalsePart.
IIF(True, TruePart, IIF(True, TruePart, FalsePart))
Fill your real values: ex:
IIF(x=2, 10, IIF(y=3, 10, 20))
Having both TruePart and FalsePart IIFs
IIF(True, IIF(True, TruePart, FalsePart), IIF(True, TruePart, FalsePart))
Fill your real values: ex:
IIF(x=2, IIF(y=3, 10, 20), IIF(y=3, 10, 20))
You can expand by (nesting IIFs) replacing TruePart/FalsePart as presented.
IIF(True, TruePart, FalsePart)
Having another IIF for TruePart, copy the whole and replace TruPart.
IIF(True, IIF(True, TruePart, FalsePart), FalsePart)
Fill your real values: ex:
IIF(x=2, IIF(y=3, 10, 20), 3)
Having another IIF for FalsePart, copy the whole and replace FalsePart.
IIF(True, TruePart, IIF(True, TruePart, FalsePart))
Fill your real values: ex:
IIF(x=2, 10, IIF(y=3, 10, 20))
Having both TruePart and FalsePart IIFs
IIF(True, IIF(True, TruePart, FalsePart), IIF(True, TruePart, FalsePart))
Fill your real values: ex:
IIF(x=2, IIF(y=3, 10, 20), IIF(y=3, 10, 20))
You can expand by (nesting IIFs) replacing TruePart/FalsePart as presented.
SteveL13
The first problem with your statement was the missing paren ...
mx
The first problem with your statement was the missing paren ...
mx
= IIf([txtTotalPartNdemand] - ([txtWIPqtyAM] + [txtFGqty] + [txtTotWHqty]) < 0, 0, [txtTotalPartNdemand] - ([txtWIPqtyAM] + [txtFGqty] + [txtTotWHqty]))