EXCEL SOLUTIONS

IFS function in Excel

Checks several conditions in order and returns the result for the first one that is true. A cleaner way than many IFs inside each other.

IntermediateLogic

Syntax

=IFS(test1, value1, [test2, value2], ...)
Arguments of IFS
ArgumentWhat it means
test1, value1A condition and the result to show if it is true.
test2, value2More pairs. The first true condition wins.

Examples with results

Every result below is calculated by the practice engine on the sample data shown, not typed in by hand.

Class scores (fictional)

RowABCD
1StudentMathsScienceEnglish
2Layla788591
3Omar627058
4Priya958892
5Quinn455261
6Rosa887984
Class scores (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

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

    Letter grade for Layla’s Maths score

  • =IFS(B5>=90,"A",B5>=75,"B",B5>=60,"C",TRUE,"D")D

    The same formula for Quinn

Try it yourself

Change the formula or switch to other sample data.

Press Calculate to see the result.

The practice box runs in your browser with BDK’s own calculator, which covers about 60 common functions. Cell references work as in Excel (B2, B2:B9). Your formulas are not saved or sent anywhere. For anything unusual, check the result in Excel itself.

How people use IFS at work

  • Education

    Turn a score into a band.

    =IFS(D4>=90,"Excellent",D4>=70,"Good",TRUE,"Needs support")Excellent
    Data: Class scores (fictional)
  • Finance and accounting

    Invoice age band.

    =IFS(45<=30,"Current",45<=60,"31 to 60 days",TRUE,"Over 60 days")31 to 60 days

Common mistakes and tips

  • If no condition is true you get #N/A. End with TRUE and a default result, as in the examples.
  • Conditions are checked in order, so put the strictest first.

Works in

Excel 2019 and Microsoft 365 or later, and Google Sheets. Not in Excel 2016 or older.

Related formulas

IFVLOOKUP

Lessons that use it

Need Something Different? Let’s Talk.

Looking for different features or something built around your workflow? Share your idea with us.