What IFS does
IFS checks several conditions in order and returns the result paired with the first one that’s TRUE. =IFS(B2>60,"Collections",B2>30,"Second notice",B2>0,"Reminder",TRUE,"No action") sorts invoices into four groups by how many days they’re overdue. It does the job of an IF nested inside another IF, written as one list of pairs.
Each pair is a test and the result for it. Excel reads the pairs from left to right and stops at the first test that’s TRUE, so the order of the tests matters as much as in a nested IF. A test can look at any cell and use any comparison, which makes IFS the choice for bands of numbers and for rules that check more than one column.
When no test is TRUE, IFS shows #N/A. To give a result for everything left over, make the last test TRUE, which always passes.
Syntax
logical_test1Required- The first condition to check, such as
B2>60orC2="Urgent". It must come out TRUE or FALSE. value_if_true1Required- What to return when the first condition is TRUE: text in quotation marks, a number, a cell or a calculation.
logical_test2Optional, can repeat- The next condition, checked only when every condition before it is FALSE. Add pairs as you need them, up to 127, and end with
TRUEto catch everything left. value_if_true2Optional, can repeat- What to return when that condition is the first TRUE one.
Example: what to do about an overdue invoice
A collections team acts on each unpaid invoice by how long it’s overdue. The formula in C2 is filled down to C6.
Read it as: over 60 days goes to collections, over 30 gets a second notice, anything over 0 gets a reminder, and the rest need no action. The tests run from the highest band down, so 75 days stops at the first test and never reaches the reminder.
Example: tests on different columns
The tests in one IFS don’t have to look at the same cell. A web shop picks the shipping method from the order’s priority in column C and its total in column B.
IFS vs nested IF
Both give the same answers. The nested IF puts each IF in the previous one’s value-if-false slot, and IFS lists the same tests side by side:
=IF(B2>60,"Collections",IF(B2>30,"Second notice",IF(B2>0,"Reminder","No action")))=IFS(B2>60,"Collections",B2>30,"Second notice",B2>0,"Reminder",TRUE,"No action")
IFS ends with one closing bracket instead of a row of them, and a new band is one more pair, so it’s easier to change later. The nested IF works in every version of Excel, while IFS needs Microsoft 365 or Excel 2019 or later and shows #NAME? in Excel 2016. Both stop at the first TRUE test, so the order rules are the same. To join several checks into one test, put AND or OR inside it, as the free lesson Combine tests with AND, OR and NOT shows.
When every test compares one cell with exact values, such as codes, SWITCH is shorter still.
Common mistakes
=IFS(B2>60,"Collections",B2>30,"Second notice",B2>0,"Reminder")shows#N/Afor an invoice that isn’t overdue, because no test is TRUE. End withTRUE,"No action", orTRUE,""for an empty-looking cell.=IFS(B2>0,"Reminder",B2>30,"Second notice",B2>60,"Collections",TRUE,"No action")sends a reminder for 75 days, because 75 is also over 0 and the first TRUE test wins. Order the tests from one end of the scale.=IFS(B2>60,Collections,…)shows#NAME?, because text results need quotation marks.- A pair with no result, such as a test at the very end without a value, isn’t accepted: Excel says there are too few arguments. Every test needs its result.
Frequently asked questions
How do I use IFS with multiple conditions?
Write each condition followed by its result, in order: =IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",TRUE,"F"). To combine two checks in one test, put them inside AND or OR, as in AND(B2>=50,C2="Yes").
How do I give IFS a default value?
IFS has no value-if-false argument, so make the last test TRUE. It always passes, and its result is used whenever no test before it is TRUE: =IFS(B2>60,"Collections",B2>0,"Reminder",TRUE,"No action").
What is the difference between IF and IFS?
IF runs one test and returns one of two results. IFS runs a list of tests and returns the result of the first TRUE one, so it replaces several IFs nested inside each other.
Why does IFS return #N/A?
None of the tests came out TRUE and there’s no catch-all at the end. Add TRUE and a result as the last pair.
How do I use IFS for a value between two numbers?
Test the bands in order from one end, and each test only sees the values the ones before it let through: after B2>60, the test B2>30 already means more than 30 and at most 60. For a band on its own, use AND: =IFS(AND(B2>=10,B2<=20),"In range",TRUE,"Out of range").
Which versions of Excel have IFS?
Microsoft 365, Excel for the web, and Excel 2019 or later. In Excel 2016 the formula shows #NAME?, so use nested IFs in workbooks shared with people on older versions.