Functions
IF
Conditional value
Try it
When to use it
When should I use IF instead of IFERROR?
Use IF to choose between two outcomes based on a condition you write; use IFERROR only to catch and replace a formula that returns an error.
How do I check more than one condition with IF?
Nest IF statements or combine them with AND/OR inside the test, e.g. IF(AND(x>0, y>0), both, not both).
Use cases
Pass or fail based on a score
Flag whether a budget is over or under
Used in
Syntax
IF(condition, true_val, false_val)Examples
=IF(TRUE,4,5) // => 4
=IF(FALSE,4,5) // => 5