Conditional Operators
When using conditional operators, consider the following:
-
Expression can be any valid formula expression. The expression can be any combination of a constant (integer or real number), a reference, or another function.
-
Reference can be any valid reference; thus the
IFNN
reference property can be utilized as part of the reference. -
Condition can be any valid condition applied to the complex conditions And, Not, and Or. These operators can have embedded conditions. (And, Not, and Or operators require surrounding parentheses.)
-
When any
expression
within the condition returns an #error or #missing value, theIf
function returns #missing or #error. This does not apply when you use theIsMissing
,IsError
, orIsNonNumeric
conditions.
Table 10-10 Conditional Operators
Conditional Operator | Syntax | Logic |
---|---|---|
Equal To |
expression |
Tests if the left expression is equal to the right expression. If rounding is required, use the Example: |
Greater Than |
expression |
Tests if the left expression is greater than the right expression. Example: |
Greater Than or Equal To |
expression |
Tests if the left expression is greater than or equal to the right expression. The correct syntax is ">=". The syntax "=>" is not supported. Example: |
Less Than |
expression |
Tests if the left expression is less than the right expression. Example: |
Less Than or Equal To |
expression |
Tests if the left expression is less than or equal to the right expression. The correct syntax is "<=". The syntax "=<" is not supported. Example: |
Not Equal To |
expression expression |
Tests if the left expression is not equal to the right expression. If rounding is required, use the Example:
|
IsMissing |
|
Tests if the reference contains a #missing result. If the reference is an expanded row or column, then all resulting cells must be #missing in order for the condition to be true. Example: |
IsError |
|
Tests if the reference contains an #error result. If the reference is an expanded row or column, all resulting cells must be #error in order for the condition to be true. Only formula rows and columns can result in #error. Example: |
IsNonNumeric |
|
Tests if the reference contains a #missing or #error results. If the reference is an expanded row or column, all resulting cells must be #missing and/or #error in order for the condition to be true. Example: |
Parenthesis |
|
Groups a condition. Example: |