IF
Syntax:
IF ( logical-value , [ value-if-true ] [ , [ value-if-false ] ] )
Description: Tests logical-value, and if it is TRUE, value-if-true is evaluated and returned; otherwise, value-if-false is evaluated and returned.
Arguments:
Name |
Type |
Description |
|---|---|---|
logical-value |
logical |
The value to be tested. |
value-if-true |
any |
The value returned if logical-value is |
value-if-false |
any |
The value returned if logical-value is |
If any argument is an array, every element of that array shall be evaluated when that argument is evaluated.
Return Type and Value: any – value-if-true, if logical-value is TRUE; otherwise, value-if-false.
IF(10>5,,"No") results in 0IF(10>5,,) results in 0IF(10>5,"Yes",20) results in YesIF(10<5,"Yes",20) results in 20]