Related Topics: | ||
Description: Returns a value if one condition is true, and returns another value of the condition is false. Use IF to conduct conditional tests on values and formulas.
Syntax: IF(Logical_test, [Value_if_true], [Value_if_false])
Logical_test is any value or expression that can be evaluated to TRUE or FALSE.
Value_if_true is the value that is returned if Logical_test is TRUE. If Logical_test is TRUE and Value_if_true is blank, this argument returns 0 (zero). To display the word TRUE, use the logical value TRUE for this argument.
Value_if_false is the value that is returned if Logical_test is FALSE. If Logical_test is FALSE and Value_if_false is omitted, (that is, after Value_if_true, there is no comma), then the logical value FALSE is returned. If Logical_test is FALSE and Value_if_false is blank (that is, after Value_if_true, there is a comma followed by the closing parenthesis), then the value 0 (zero) is returned.
Remarks:
You must include at least one of the Value_if_true and Value_if_false arguments.
After evaluating the arguments, IF returns either the Value_if_true argument or the Value_if_false argument, if provided.
Example:
IF(50 <= 100,1,0) = 1
© 1992-2015. ReliaSoft Corporation. ALL RIGHTS RESERVED.