IF

IF(arg1, arg2, arg3) → { number | string | boolean }

Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE.

Parameters:

Name Type Description
arg1 boolean

Is any value or expression that can be evaluated to TRUE or FALSE.

arg2 any

Is the value that is returned if Logical_test is TRUE. If omitted, TRUE is returned. You can nest up to seven IF functions.

arg3 any

Is the value that is returned if Logical_test is FALSE. If omitted, FALSE is returned.

Returns:

Type
number | string | boolean