If

Returns a result based on a conditional alternative.

Syntax

If(condition, valTrue[, valFalse])
Si(condition, valTrue[, valFalse])
condition = Boolean parameter defining the alternative
valTrue = parameter defining the result of the function if condition is True
valFalse = optional parameter defining the result of the function if condition is False

Remarks

If no valFalse is provided, the function will return an empty result in the case of an unverified alternative.

Examples

If(0=0, "toto") = "toto"
If(Day(Now)=1, "first", "other") = "first" if the current day is the first of the month; if not, "other"

Classification

Logic