Excel Study · Module 3: Decisions with IF
Class 23Nested IF: grades A, B, C
Intermediate1:29 videoFree
Three results need two decisions, so put an IF inside an IF. First test: 80 or more gives an A. Only if that is false does the second IF run: 60 or more gives a B, anything lower a C.
Try this AI prompt
Works in ChatGPT, Gemini, Copilot or Claude.
In Excel, B2 has a student's marks. Write a formula for D2 that gives grade A for 80 or more, B for 60 to 79, and C for anything below 60.
The answer that works
✓ checked in Excel=IF(B2>=80,"A",IF(B2>=60,"B","C"))
AI can get Excel wrong. Paste its answer into Excel and test it before you trust it.