Spreadsheet Practice

IFS function

IFS checks a list of conditions in order and returns the value paired with the first one that is TRUE. It replaces nested IFs for tiers and grades: =IF(A,x,IF(B,y,z)) becomes a flat list of test and value pairs that is easier to read and edit.

Available in
Excel 2019 and later, including Microsoft 365
Category
Logical functions
Returns
The value for the first TRUE test, or #N/A when none of the tests is TRUE.
Google Sheets
Available in Google Sheets.

Syntax

=IFS(test1, value1, [test2, value2], ...)

ArgumentRequired?What it is
test1RequiredThe first condition to check.
value1RequiredWhat to return when test1 is TRUE.
test2OptionalThe next condition, checked only when the ones before it are FALSE. Add as many pairs as you need, up to 127.
value2RequiredWhat to return when test2 is TRUE.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
D2=IFS(B2>=10000,"Gold",B2>=2500,"Silver",TRUE,"Bronze")GoldThe first test is TRUE, so Gold
D3=IFS(B3>=10000,"Gold",B3>=2500,"Silver",TRUE,"Bronze")SilverThe first test is FALSE and the second is TRUE, so Silver
D4=IFS(B4>=10000,"Gold",B4>=2500,"Silver")#N/ANo catch-all at the end, so a value below every threshold returns the #N/A error

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
CustomerAnnual spendTier
Lakeview Dental$14,200Gold
Birch Cafe$3,800Silver
Northline Freight$620#N/A

Practice IFS

From lesson 6, AND, OR & IFS. Graded instantly, then re-checked on changed data.

Letter grades

In C2, use IFS to assign a grade: 90+ is A, 80–89 B, 70–79 C, below 70 F. Fill down to C7.

Common mistakes

What you seeWhy, and how to fix it
#N/ANone of the tests was TRUE. End the list with TRUE and a default value, such as TRUE,"Other".
Tiers in the wrong orderIFS stops at the first TRUE test. Put the strictest condition first (>=10000 before >=2500), or every large customer lands in the lower tier.
#NAME?IFS needs Excel 2019 or later. In Excel 2016, use nested IFs or a lookup table with an approximate match.
"You've entered too few arguments"Every test needs a value after it. Look for a test that is missing its result.

Tips

  • TRUE as the last test works as "everything else".
  • For long tier lists, a small table with XLOOKUP and match_mode -1 is easier to maintain than a long IFS.

Questions

What is the difference between IF and IFS?

IF handles one test with two outcomes. IFS handles many tests in a flat list and returns the value for the first one that is TRUE, which replaces nested IFs.

How do I add an "else" to IFS?

Make the last pair TRUE and your default value: =IFS(A2>90,"A",A2>80,"B",TRUE,"C").

Is IFS available in Excel 2016?

No. It arrived in Excel 2019 and is in Microsoft 365. Older versions show #NAME?.

Lessons that use IFS

Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.