Menu
Coddy logo textTech

Nested IFs

Part of the Fundamentals section of Coddy's Excel journey — lesson 37 of 42.

One IF picks between two answers. But what about grades, A, B or C? The trick is to put a second IF inside the first, in the false-answer slot. This is called a nested IF:

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

Read it from left to right: is A1 at least 90? Yes → show A, done. No → don't give up, ask the next question: is it at least 80? Yes → B, no → C. Each IF handles one question and hands the rest to the next.

The order of the checks matters. Excel stops at the first condition that's true, so you test the highest band first. If you asked A1>=80 first, a 95 would grab the B before the A check ever ran.

Two bookkeeping tips: every IF you open needs its own closing parenthesis, two IFs, two ) at the end. And each extra IF adds exactly one more possible answer: two nested IFs give three outcomes, three IFs give four, and so on.

challenge icon

Challenge

Easy

The sheet holds a test score: Score in A1 and the number in B1.

In C1, write a nested IF that turns the score into a letter grade:

  1. A for scores of 90 or more
  2. B for scores of 80 or more (but under 90)
  3. C for everything else

Use capital letters A, B, C. The tests will send a score into each band, check your bands from the top down.

Try it yourself

Sheet1
ABCDEFG
1Score87
2
3
4
5
6
7
8
9
10
11
12
13
14
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals