if function

Tests a condition and returns a different result depending on the conditional check.

Syntax

IF (condition, result_when_true, result_when_false)

Arguments

condition → The condition which should be checked. result_when_true → The result which will be returned when the condition is True. result_when_false → The result which will be returned when the condition is False.

Example

 IF( 1, 'One', 'Not One' ) → returns 'One' 
 IF( 8, 'One', 'Not One' ) → returns 'Not One'