TX Sheet Control

IF Function

Function

Choose a result based on a logical test. logical_test is the condition; a number other than 0 counts as TRUE, and text that is not a logical value returns #VALUE!. IF returns value_if_true when the condition is true and value_if_false otherwise. When value_if_false is omitted, a false condition returns FALSE; when it is empty, it returns 0. An error in logical_test is returned unchanged.

Syntax

IF(logical_test, value_if_true, value_if_false)

Category: Logical. Minimum arguments: 2. Maximum arguments: 3.

Available for supported offline calculation.

Examples

=IF(10>5,"Yes","No")

The formula returns Yes, because 10 is greater than 5.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

See Also