Nested IF practice exercises

A nested IF puts one IF inside another to handle more than two outcomes, like turning scores into letter grades. The trick is ordering the tests so the first one that's true gives the right answer.

Syntax

IF(test1, value1, IF(test2, value2, value_otherwise))
test1
Checked first. Put the strictest condition (the highest threshold) here.
IF(test2, ...)
Only checked when test1 is FALSE.
value_otherwise
The result when no test is TRUE.

The practice data

Test scores for 8 students, and a grade table (D1:E6) sorted from the lowest minimum score up. Every exercise below uses this sheet, and your answer goes in H2.

ABCDE
1StudentScoreMin scoreGrade
2Ana920F
3Ben6760D
4Cara8570C
5Dev5880B
6Eli7490A
7Fay100
8Gus81
9Hal69

Worked example

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

Ana scored 92, so the first test is TRUE and the result is "A". Result:

A

Your turn: 3 exercises

Type a formula and press Enter. It is checked by a real formula engine, so any correct approach counts.

1 Label each score Distinction if 85 or more, Pass if 60 or more, otherwise Fail. Copied down to H9.

H2

2 Give each score a letter grade: A 90+, B 80+, C 70+, D 60+, otherwise F. Copied down to H9.

H2

3 Label each score Perfect if exactly 100, Excellent if 90 or more, otherwise -. Copied down to H9.

H2

Practice Nested IF in the full lesson, free

Lesson 4 has more exercises in a real spreadsheet grid, with hints and progress tracking. No card needed.

Open lesson 4

Common Nested IF mistakes

FAQ

How many IFs can I nest?

Google Sheets and Excel allow many (Excel allows 64), but beyond 3 or 4 a lookup table or IFS is easier to read and maintain.

Nested IF or IFS?

IFS lists each condition and result as a pair without nesting: =IFS(B2>=90,"A",B2>=80,"B",TRUE,"C").

Keep practicing