Cellgrids Cellgridsby LearnWithRinkesh
Home › Excel tutorials › IFS Function in Excel (Replace Nested IF)

How to Use the IFS Function in Excel Instead of Nested IF

By Rinkesh Shah · Business Analyst, 8 years in data · Updated 2026-10-31

▶ Video coming soon

A nested IF with four or five levels is hard to read and easy to break. IFS checks conditions one after another and returns the result for the first one that is true, with no extra brackets. It works in Excel 2019 and Microsoft 365.

Syntax

=IFS(test1, result1, test2, result2, ...)

Example: grade from a score

Score in B2:

=IFS(B2>=90,"A", B2>=75,"B", B2>=60,"C", B2>=40,"D", TRUE,"Fail")

The last pair uses TRUE as a catch-all. Without it, a score below 40 returns #N/A.

Order matters

IFS stops at the first true test. If you write B2>=40 first, every passing score would return that first result. Always write the strictest condition first when you test numbers with greater-than.

Compare with nested IF

The same grade formula with nested IF is =IF(B2>=90,"A",IF(B2>=75,"B",IF(B2>=60,"C",IF(B2>=40,"D","Fail")))). It gives the same answer, but IFS is much easier to edit when a rule changes.

When not to use IFS

Worked example

Grades from marks in A2: =IFS(A2>=90,"A",A2>=75,"B",A2>=50,"C",TRUE,"Fail"). Excel checks each test in order and returns the first one that is true. The last pair TRUE,"Fail" is the default.

Common mistakes

Frequently asked questions

IFS or nested IF?

IFS is easier to read. Nested IF works in every Excel version.

How many conditions can IFS have?

Up to 127 pairs.

Why does IFS return #N/A?

No test was true. Add TRUE with a default value as the last pair.

Practice this online, free

Reading is only half of learning Excel. Cellgrids is a free place for online Excel practice: solve Excel formula exercises in a live spreadsheet, prepare for Excel interview questions, and work through business case studies built for data analytics and business analytics roles.

Practice these formulas: IFS, IF, AND.

Start Excel practice → Case studies