Practice / Logic

Convert a score into a letter grade (nested IF)

Medium Logic

It's report-card season: exam scores are already entered, and the school system needs a letter grade beside each one. Fill the Letter cell B2 with a grade for the score in A2: A for scores ≥90, B for ≥80, C for ≥70, otherwise D.

Your solution should use cell references so it updates automatically when Test Case input values change.

Hints 0/3
Solutions 1
–
Test case
1
2
3
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

Notes

Evaluate thresholds from high to low. Modern Excel also offers IFS, but nested IF remains the interview classic.

Function guide

FAQ

How do I build a nested IF letter grade formula?

Evaluate high to low, for example =IF(A2>=90,"A",IF(A2>=80,"B",IF(A2>=70,"C","D"))).

Can I use IFS instead of nested IF?

Yes in modern Excel and Google Sheets. Nested IF is still useful for interviews and older workbooks.