IF (if-then-else condition)

<< Click to Display Table of Contents >>

IF (if-then-else condition)

Syntax:

IF(Condition, IfTrue [, IfFalse])

Description:

Returns IfTrue, if the specified Condition is TRUE, else returns IfFalse (if given).

Condition can be any kind of value or expression that returns TRUE or FALSE.

IfTrue and IfFalse can be any kind of value or expression (including formulas).

Example:

IF(A1<5, "Order!", "ok") returns the text string "Order!" if A1<5. If this is not the case (A1 is therefore ≥ 5), it returns the text string "ok".

See also:

CHOICE, IFERROR