The IFS function in Excel lets you test multiple conditions in a single formula and return the first matching result, replacing nested IF statements. The syntax is =IFS(condition1, value1, condition2, value2, ...). It works in Excel 2019, Excel 2021, Excel for Microsoft 365, and Excel for the web. Older versions (Excel 2016 and earlier) do not have IFS; use nested IFs instead.
What You'll Need
- A version of Excel that supports IFS (2019 or later, Microsoft 365, or Excel for the web).
- Data in cells that you want to evaluate (numbers, text, or dates).
- Basic familiarity with cell references and comparison operators (=, <, >, <=, >=, <>).
Step-by-Step
- Click the cell where you want the result. This is where the formula will display its output.
- Type
=IFS(to start the formula. Excel will show a tooltip with the argument order: condition1, value1, condition2, value2, etc. - Enter your first condition. For example, to check if cell A2 is greater than 90, type
A2>90. Conditions must evaluate to TRUE or FALSE. - Type a comma, then the value to return if that condition is true. For example,
"A"(include quotes for text) or100(no quotes for numbers). - Repeat for each additional condition and value pair. Separate each pair with a comma. For example:
=IFS(A2>90,"A",A2>80,"B",A2>70,"C"). - Close the parenthesis and press Enter. Excel returns the value for the first condition that is true. If none are true, IFS returns
#N/Aunless you add a final catch-all condition likeTRUE,"F". - Copy the formula down by dragging the fill handle (the small square at the bottom-right of the cell) to apply it to other rows. Relative references adjust automatically.
Note: Menu labels and function behavior can differ slightly by Excel version, device, or region. The IFS function itself is consistent across supported versions.
Common Mistakes
- Forgetting the catch-all condition. If no condition is true, IFS returns
#N/A. Add a final pair likeTRUE, "No match"to handle that case. - Using IFS in an unsupported version. Excel 2016 and earlier show
#NAME?because IFS does not exist there. Use nested IFs instead. - Mismatched parentheses or commas. Each condition-value pair needs exactly one comma between them, and the whole formula needs one closing parenthesis.
- Text values without quotes. If you want to return text like
Pass, type"Pass"with quotation marks. Numbers and cell references do not need quotes. - Conditions that overlap unintentionally. IFS stops at the first TRUE condition, so order matters. Put the most specific or highest-priority condition first.
- Using IFS with array formulas in older Excel versions. IFS may not work inside array formulas in some versions; test before relying on it.
Tips
- Use cell references for conditions and values so you can change inputs without editing the formula.
- Keep conditions mutually exclusive where possible to avoid confusion about which result wins.
- For simple two-outcome logic, a regular IF is shorter and easier to read.
- Press
Alt+Enter(Windows) orOption+Return(Mac) inside the formula bar to add line breaks and make long IFS formulas easier to read. - Use the Formula Bar's
fxbutton to see argument hints as you type.
Troubleshooting
- #NAME? error: Your Excel version does not support IFS. Check your version under File > Account (or Excel menu > About Excel on Mac). If it is 2016 or earlier, rewrite using nested IFs:
=IF(A2>90,"A",IF(A2>80,"B","C")). - #N/A result: No condition was true. Add a final
TRUE, "default"pair. - #VALUE! error: A condition or value is the wrong type (for example, text where a number is expected). Check that comparisons use the same data type.
- Formula returns unexpected result: Review the order of conditions. The first TRUE wins. Also confirm cell references point to the intended cells.
- Formula not calculating: Ensure calculation is set to Automatic under Formulas > Calculation Options. Press
F9to force a recalc. - Cannot edit formula: The sheet may be protected. Go to Review > Unprotect Sheet (you may need a password).
Frequently Asked Questions
What is the difference between IF and IFS?
IF handles one condition (with optional false result). IFS handles multiple conditions without nesting, returning the value for the first true condition.
Can I use IFS with text conditions?
Yes. For example, =IFS(A2="Yes",1,A2="No",0) returns 1 for "Yes" and 0 for "No". Text comparisons are case-insensitive by default.
How many conditions can IFS handle?
Excel allows up to 127 condition-value pairs in IFS, but practical readability suffers beyond a handful. Consider a lookup table for many conditions.
Does IFS work in Excel for Mac?
Yes, in Excel 2019, Excel 2021, and Microsoft 365 for Mac. It is not available in Excel 2016 for Mac or earlier.
What happens if two conditions are true?
IFS returns the value for the first true condition only. Later conditions are ignored.
Can I nest IFS inside another function?
Yes, IFS can be used as an argument inside functions like SUM or IF, as long as the outer function accepts a value.