A Nested IF means placing one IF function inside another IF function.
It is used when you need to test multiple conditions in a specific order.
Instead of checking only one condition, Nested IF allows Excel to evaluate several possibilities.
Basic Structure of Nested IF
=IF(condition1, result1,
IF(condition2, result2,
IF(condition3, result3, result_if_false)))
Excel checks conditions one by one from left to right.
Example 1: Grading System
If marks are in cell A1:
=IF(A1>=80,"A",
IF(A1>=60,"B",
IF(A1>=40,"C","Fail")))
Explanation:
- 80 or more → A
- 60–79 → B
- 40–59 → C
- Below 40 → Fail
Excel stops once a TRUE condition is found.
Example 2: Sales Commission
If sales amount is in A1:
=IF(A1>5000,"High Bonus",
IF(A1>3000,"Medium Bonus",
IF(A1>1000,"Low Bonus","No Bonus")))
How Nested IF Works
- Excel checks the first condition.
- If TRUE → returns result.
- If FALSE → moves to the next IF.
- Continues until a condition is TRUE or reaches the final result.
Important Tips
- Always arrange conditions logically (highest to lowest is recommended).
- Carefully match parentheses.
- Use indentation (spacing) to make formulas easier to read.
- Avoid too many nested IFs (Excel allows many, but readability becomes difficult).
Common Mistakes
- Missing brackets
- Incorrect logical order
- Forgetting quotation marks for text
Why Nested IF Is Important
It helps you:
- Handle multiple decision-making scenarios
- Create grading systems
- Calculate commissions
- Categorize data
- Build advanced logical formulas
Nested IF is a powerful technique for managing complex logical conditions in Excel spreadsheets.