Help Centre › Functions & Formulas
For a full list of available calculation functions, please read What calculation functions are supported.
This article describes the formula syntax and usage of the IF function.
Description
An IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False.
Syntax
IF(logical_test, value_if_true, [value_if_false])
The IF function syntax has the following arguments:
- logical_test - Required. The condition you want to test.
- value_if_true - Required: The value that you want returned if the result of logical_test is TRUE.
- value_if_false - Optional: The value that you want returned if the result of logical_test is FALSE.
Example
| Formula | Description | Result |
| =IF({variable} > 10, TRUE, FALSE) | Tests the condition if the variable (assuming its value is 20) is larger than 10 | TRUE |
| =IF(LEN({variable})<10, "too short", "perfect") | Tests the condition if the LEN of the variable (assuming its value is "Home") is shorter than 10 characters | too short |
Errors
For a full list of formula errors, please read Formula errors.