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

ArgumentRequiredWhat it means
logical_expressionYesAn expression or cell reference that evaluates to TRUE or FALSE.
value_if_trueYesThe value returned when the expression is TRUE.
value_if_falseNoThe value returned when the expression is FALSE. It is blank by default.

Examples

Label a passing score

AB
1StudentScore
2Ava84
=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.