Back to Blog

Nested IF Statements in Google Sheets: Complete Guide with Examples | SheetXAI

D
David De Souza
Dec 1, 2025
6 min read
Nested IF Statements in Google Sheets: Complete Guide with Examples | SheetXAI

The Problem

You need to grade scores: >90 is A, >80 is B, otherwise C. A single IF can't handle this three-way logic.

The Easy Way: Use SheetXAI

If you don't want to mess with formulas, the fastest way to do this is simply by asking.

With SheetXAI, you can open the sidebar and type:

Type this prompt

If score is > 90 put A, if > 80 put B, else C.

SheetXAI will instantly write the formula or script for you and fill the cells. It handles the syntax so you can focus on the result.

Try this yourself — free for 7 days

SheetXAI installs in your Google Sheet or Excel workbook in about a minute. Paste the prompt below and watch it run.

or install from the marketplace

The Manual Way: The Formulas You Need

To do this manually, you need to use: IF (multiple times).

1. IF

Checks a condition and returns one value if true, another if false.

Syntax: =IF(logical_test, value_if_true, value_if_false)

  • logical_test: The value or expression that can be evaluated to TRUE or FALSE.
  • value_if_true: The value that you want to be returned if the logical_test argument evaluates to TRUE.
  • value_if_false: The value that you want to be returned if the logical_test argument evaluates to FALSE.

Example: =IF(A1>50, "Pass", "Fail")

Understanding the Logic

We check the first condition. If it fails, instead of just saying "False", we start a new IF formula in the "False" slot.

The Final Formula:

=IF(A2>90, "A", IF(A2>80, "B", "C"))

Conclusion

Now you know the "classic" way to solve this using formulas. It's a great skill to have.

But for those times when you just want the job done without the mental math, SheetXAI is there to help.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more