IF Function

The IF function is one of the logical functions. Is used to check the logical expression and return one value if it is TRUE, or another if it is FALSE.

Syntax

IF(logical_test, value_if_true, [value_if_false])

The IF function has the following arguments:

ArgumentDescription
logical_testThe condition that you want to test.
value_if_trueThe value to be returned if the result is TRUE.
value_if_falseThe value to be returned if the result is FALSE.
Notes

How to apply the IF function.

Examples

There are three arguments: logical_test = A1<100, value_if_true = 0, value_if_false = 1, where A1 is 12. This logical expression is TRUE. So the function returns 0.

IF Function: TRUE

If we change the A1 value from 12 to 112, the function returns 1:

IF Function: FALSE

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags