If

Returns the value following the first condition that is met.

Usage

If(condition 1, value 1, [condition 2], [value 2],..., [else])

If Condition 1 is True, Value 1 is returned. If Condition 2 is True, Value 2 is returned. If all conditions are false, the Else value listed last in the function is applied.

condition 1 (required) Logical condition that returns a result that is either True or False. If the condition is True, the function returns the following value.

value 1 (required) The value to be returned if its preceding condition is True.

condition 2+, value 2+ (optional) Several , pairs can be listed in a single function. Every supplied condition must have a corresponding value.

else (optional) The value to be returned if no conditionals evaluate as True. If no condition is supplied, a Null result is returned when no conditions are met.

Example

If([size] < 3, "small", [size] < 6, "medium", "large")
  • Assign “small” to sizes less than 3, “medium” to sizes less than 6, and “large” to all other sizes.
If([revenue] - [cost] > 0, "profit", "loss")
  • Categorize a record as a profit or a loss based on revenue and cost.

See Also

Was this article helpful?

Anything else?

Our customer support team is here to help.

Contact Us