IF returns the appropriate result based on whether certain conditions are satisfied. The function must contain a condition (or equation) that produces a true or false answer and a result for each answer. Enter a separator (shown as a comma below) after each condition and answer.
Syntax |
IF (condition, true, false) |
Examples |
IF (Depth LE 6, 6, Depth) |
The condition may include any of the relational and logical operators below.
GT or > |
Greater than |
LT or < |
Less than |
EQ or = |
Equal to |
GE or >= |
Greater than or equal to |
LE or <= |
Less than or equal to |
NE or <> |
Not equal to |
AND |
Returns the true result only if both conditions are satisfied. Example |
OR |
Returns the true result if either condition is satisfied. Example |
NOT |
Modifies part of an equation to reverse its meaning. Example |
Tips: