The ternary condition (? :) is a compact way to evaluate a condition and return one of two results, depending on whether it is true or false. It is a shortcut to the if...else structure, avoiding a full IF formula. The returned result has the type of the chosen values (text, number...).
Syntax
condition ? result_if_true : result_if_false
Examples
Check a headcount
The formula checks whether the number of people present is greater than 5 and returns a response based on the result.
Present > 5 ? "Yes" : "No"
If Present = 8, the condition 8 > 5 is true: the formula returns "Yes". If Present = 3, the condition 3 > 5 is false: the formula returns "No".
Go further
AND
The operator that checks whether all conditions are true.
Or continue with
Formula glossary
All available operators and functions, sorted by category.