VBScript Reference > Format Category > IIF Function |
The IIF function is equivalent to its Visual Basic counterpart. That is, it returns the result of one of two expressions depending upon the value of a boolean condition. If the condition (first argument) is True, the function returns the value of the second argument; otherwise, it returns the value of the third argument.
IIF(condition, truepart, falsepart)
Argument
condition is a Boolean expression that determines which expression is evaluated.
truepart is evaluated if condition is True.
falsepart is evaluated if condition is False.