New: ready-to-use spreadsheet templatesExplore the collection  →
LOGICAL · GOOGLE SHEETS

IF
return one value when a condition is true and another when false.

Use IF to label orders above 100. This guide shows the exact structure, a working example and the mistakes most likely to break it.

JosephineVerified by JosephineReviewed July 25, 2026
THE FORMULA=IF(logical_expression, value_if_true, value_if_false)
A

logical_expressiontest to evaluate

B

value_if_trueresult when true

C

value_if_falseresult when false

TRY IT YOURSELF

Change the sheet.
Watch the answer update.

Edit any highlighted cell below. The example recalculates immediately.

LIVE PLAYGROUND=IF(B2>=100,"High","Standard")
fx=IF(B2>=100,"High","Standard")
A · STATUSB · VALUE
2
3
4
5
RESULTHighUpdates live

Try changing a value above. This example runs entirely in your browser.

IN PLAIN ENGLISH

How the formula
thinks.

  1. 01

    logical_expressiontest to evaluate

  2. 02

    value_if_trueresult when true

  3. 03

    value_if_falseresult when false

COMMON FIXES

When IF
doesn’t behave.

WRONG RESULT

Wrong result

Check that every range starts and ends on the same rows, and that numbers are stored as numbers.

FORMULA PARSE ERROR

Formula parse error

Check commas, quotation marks and closing parentheses. Your locale may use semicolons instead of commas.

UNEXPECTED BLANKS

Unexpected blanks

Test the source cells for hidden spaces, empty strings and inconsistent data types.

fxNeed help with IF?Fix my formula →