AnalystPracticeGuides
DashboardSign up

Nested IF vs IFS: handling several conditions in Excel

Both pick one result from several conditions. IFS is easier to read and is available in Excel 2019, Excel 2021 and Microsoft 365. Nested IF works in every version. In both, the order of the conditions decides the result.

Watch it solved. Task 8: grade results with IFS, from 5:55, in our video “Data Analyst Interview Questions and Answers: 10 SQL + Excel Tasks, Solved”. Pressing play loads the video from YouTube (privacy). Open on YouTube

How do the two look side by side?

Grade a score in B2: 90+ is A, 75+ is B, 60+ is C, below is F.

=IF(B2>=90,"A",IF(B2>=75,"B",IF(B2>=60,"C","F")))
=IFS(B2>=90,"A",B2>=75,"B",B2>=60,"C",TRUE,"F")

In IFS, TRUE at the end works as "everything else". Without it, a score below 60 returns #N/A.

Why does the order of conditions matter?

Both functions stop at the first condition that is true. If you check B2>=60 first, a score of 95 gets a C. Always go from the strictest condition to the loosest.

When is a lookup table better?

When the bands change often or there are more than four or five of them. Put the lower limits in a small table sorted from smallest to largest and use approximate match:

=XLOOKUP(B2,E2:E5,F2:F5,,-1)

Changing a limit then means editing a cell, not a formula.

Common mistakes

Counting closing brackets in nested IF: each IF needs its own ). Forgetting the "else" case in IFS. Text results without quotes.

Try it yourself. Practise this in a real spreadsheet in your browser, with instant feedback.
Practise nested IF Practise IFS

Updated November 2026.

← All free guides