IF

Return a value if an expression is TRUE or FALSE

Parameter List

Syntax
IF(conditionvalue_if_true
[value_if_false]
)
condition

An expression or reference to a cell containing an expression that equates to TRUE or FALSE. For example: 5>4 or A1="Spreadsheets".

value_if_true

The value to return if condition is TRUE. For example: "It's bigger".

[optional] value_if_false

The value to return if condition is FALSE. For example: "It's smaller".

Examples

IF(5>4, "yes", "no") returns yes as 5 is bigger than 4