IF
Returns depending on the condition the true or the false argument. Or, if condition evaluates in an error, the function returns the error message and is not calculated.
Syntax
=IF(Condition, TrueValue, FalseValue)
Arguments
| Name | Type | Description |
|---|---|---|
| Condition | Condition | Condition to check. |
| TrueValue | Value | Optional value to return, if the condition is true. If not specified nothing is returned. |
| FalseValue | Value | Optional value to return, if the condition is false. If not specified nothing is returned. |
Return
| Type | Description |
|---|---|
| Boolean | The appropriate value depending on the condition. |
Examples
| Formula | Result | Comment |
|---|---|---|
| "Warning" | As the condition results to TRUE, the first value is returned. |
| #N with A1 = #NA | A1 returns an error and the function will not be calculated |