0
0
ExcelHow-ToBeginner ยท 3 min read

How to Use Nested IF in Excel: Simple Guide with Examples

In Excel, you use nested IF by placing one IF function inside another to test multiple conditions in order. Each IF checks a condition and returns a result or moves to the next IF. This lets you create complex decision rules in one formula.
๐Ÿ“

Syntax

The nested IF formula looks like this:

  • =IF(condition1, value_if_true1, IF(condition2, value_if_true2, value_if_false2))
  • condition1: The first test you want to check.
  • value_if_true1: What to return if condition1 is true.
  • IF(condition2, ...): Another IF function inside the first one to check a second condition if the first is false.
  • value_if_false2: The final value if all conditions are false.

You can add more IF functions inside to test more conditions.

excel
=IF(A1>90, "Excellent", IF(A1>75, "Good", "Needs Improvement"))
๐Ÿ’ป

Example

This example checks a score in cell A1 and returns a grade:

  • If the score is greater than 90, it returns "Excellent".
  • If the score is greater than 75 but not over 90, it returns "Good".
  • If the score is 75 or less, it returns "Needs Improvement".
excel
=IF(A1>90, "Excellent", IF(A1>75, "Good", "Needs Improvement"))
Output
If A1=92 โ†’ "Excellent" If A1=80 โ†’ "Good" If A1=70 โ†’ "Needs Improvement"
โš ๏ธ

Common Pitfalls

Common mistakes when using nested IF include:

  • Forgetting to close all parentheses, which causes errors.
  • Mixing up the order of conditions, so the formula returns wrong results.
  • Making the formula too long and hard to read.
  • Not using absolute references when copying formulas, causing wrong cell references.

Example of a wrong formula missing a parenthesis:

excel
=IF(A1>90, "Excellent", IF(A1>75, "Good", "Needs Improvement"))
Output
Error: Missing closing parenthesis
๐Ÿ“Š

Quick Reference

PartDescriptionExample
IFTests a conditionIF(A1>90, ...)
conditionWhat you want to checkA1>90
value_if_trueResult if condition is true"Excellent"
value_if_falseResult if condition is false or next IFIF(A1>75, "Good", "Needs Improvement")
Nested IFIF inside another IF to test more conditionsIF(A1>90, "Excellent", IF(A1>75, "Good", "Needs Improvement"))
โœ…

Key Takeaways

Use nested IF to test multiple conditions in order within one formula.
Always close all parentheses to avoid formula errors.
Order your conditions from most specific to least specific for correct results.
Keep nested IF formulas simple to maintain readability.
Use absolute references if copying formulas to other cells.