← Excel and spreadsheets

Nested IF

An IF inside an IF picks from three or more results.

Start this lesson

To choose among more than two results, put another IF in the false part. The sheet checks the tests in order and stops at the first one that is true. Order the tests from the highest limit down, or a low test can catch values meant for a higher one.

Example: =IF(B2>=90,"A",IF(B2>=80,"B","C")) with B2 = 84

  1. Is 84 at least 90? No — Go to the false part
  2. Is 84 at least 80? Yes — This test is true
  3. "B" — The result

Why it works: IF stops at the first true test, so checking the highest limit first makes each value land in the right band and never fall through to a lower one.

Tip: Newer versions have IFS, which lists test, result, test, result without nesting. It still stops at the first true test.