Nested IF in Excel - Tutorial

Nested IF in Excel

📘 What is Nested IF?

Nested IF allows multiple conditional checks in Excel. It is useful for grading, categorization, and logical decision-making.

Excel Logo for SEO

Example Formula

=IF(A2>=90,"A",IF(A2>=80,"B",IF(A2>=70,"C",IF(A2>=60,"D","F"))))

This formula assigns grades based on score ranges.

💻 Interactive Demo

Enter a score to see the grade:

📝 More Examples

Nested IF can handle multiple scenarios. Here is another common use case:

Price Category

=IF(B2<50,"Cheap",IF(B2<100,"Moderate","Expensive"))

⚠️ When to Avoid Nested IF

While powerful, deeply nested IF formulas are hard to read and maintain. Consider using the IFS function (Excel 2016 and later) or lookup functions (VLOOKUP, INDEX/MATCH) for clearer logic.

🔗 Related Functions & Alternatives

  • IFS – evaluates multiple conditions without nesting.
  • SWITCH – matches an expression against a list of values.
  • VLOOKUP, INDEX/MATCH – lookup tables for multi‑criteria logic.

🛠 Tips for Writing Nested IFs

  • Start with the most restrictive condition first.
  • Use line breaks and indenting (Alt+Enter) in the Excel formula bar for readability.
  • Label ranges or cells with names to make formulas self‑documenting.

how to use Vlookup function in Excel

Use VLOOKUP when you need to find things in a table or a range by row. For example, look up a price of an automotive part by the part number, or find an employee name based on their employee ID. In its simplest form, the VLOOKUP function says: =VLOOKUP(What you want to look up, where you want to look for it, the column number in the range containing the value to return, return an Approximate or Exact match – indicated as 1/TRUE, or 0/FALSE).

how to use vlookup function

Use VLOOKUP when you need to find things in a table or a range by row. For example, look up a price of an automotive part by the part number, or find an employee name based on their employee ID. In its simplest form, the VLOOKUP function says: =VLOOKUP(What you want to look up, where you want to look for it, the column number in the range containing the value to return, return an Approximate or Exact match – indicated as 1/TRUE, or 0/FALSE).