Google Sheets function
IF function in Google Sheets
IF in Google Sheets checks a logical expression and returns one value when the expression is TRUE and another when it is FALSE. Use it to label results, choose between two calculations, or show different text based on a cell value, status, or comparison.
Source: Google Docs Editors HelpLast verified Nov 5, 2026
Syntax
=IF(logical_expression, value_if_true, [value_if_false])Arguments
| Argument | Required | What it means |
|---|---|---|
logical_expression | Yes | An expression or cell reference that evaluates to TRUE or FALSE. |
value_if_true | Yes | The value returned when the expression is TRUE. |
value_if_false | No | The value returned when the expression is FALSE. It is blank by default. |
Examples
Label a passing score
| A | B | |
|---|---|---|
| 1 | Student | Score |
| 2 | Ava | 84 |
=IF(B2>=70,"Pass","Review")Result: Pass
Because 84 is at least 70, IF returns the value for TRUE.
Common mistakes
Writing text results without quotation marks.
Put literal text such as "Pass" inside quotation marks.
Trying to handle several bands with one two-way test.
Use IFS when you need to test multiple conditions in order.