The IFS function in Excel lets you test several conditions in a single formula and return the first result that is TRUE, replacing long chains of nested IF statements. It is available in Excel 2019, Excel 2021, Excel for Microsoft 365, and Excel for the web; older versions (2016 and earlier) do not have it and need nested IFs instead. The basic pattern is =IFS(condition1, result1, condition2, result2, ...), where each condition is paired with the value to return when that condition is met.

What You'll Need

  • A version of Excel that supports IFS: Excel 2019 or later, Excel for Microsoft 365, or Excel for the web. Check via File > Account (or the Excel menu on Mac) to see your version.
  • A worksheet with data to test, for example a column of scores, dates, or text values.
  • Basic familiarity with cell references (like A2) and comparison operators (=, >, <, >=, <=, <>).

Step-by-Step

  1. Click the cell where the result should appear. This is usually an empty column next to your data, such as B2 if your first value is in A2.
  2. Type =IFS( to start the formula. Excel will show a tooltip listing the arguments: logical_test1, value_if_true1, and so on. Menu and tooltip wording can differ slightly by Excel version and language.
  3. Enter your first condition and its result, separated by a comma. For example, to grade a score in A2: A2>=90, "A". The condition must evaluate to TRUE or FALSE; the result can be text (in quotes), a number, a cell reference, or another formula.
  4. Add each additional condition/result pair, separated by commas. Continue the example: A2>=80, "B", A2>=70, "C", A2>=60, "D". IFS checks pairs left to right and stops at the first TRUE, so order conditions from most to least restrictive.
  5. Add a final catch-all pair for values that meet none of the conditions. Use TRUE, "F" as the last pair. Without it, IFS returns the #N/A error when nothing matches.
  6. Close the parenthesis and press Enter. The complete formula looks like: =IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",A2>=60,"D",TRUE,"F").
  7. Copy the formula down the column. Drag the fill handle (the small square at the bottom-right of the cell) or double-click it to fill adjacent rows. Relative references adjust automatically.
  8. Test edge cases. Enter a value exactly on a boundary (such as 90 or 60) and a blank cell to confirm the formula behaves as intended. A blank cell is treated as 0 in numeric comparisons, which may fall into your lowest category.

Common Mistakes

  • Forgetting the catch-all pair. If no condition is TRUE and there is no TRUE, value pair at the end, Excel returns #N/A.
  • Putting conditions in the wrong order. Because IFS stops at the first TRUE, A2>=60, "D" placed before A2>=90, "A" means every score of 60 or more returns "D".
  • Leaving out quotes around text results. Text values must be in double quotes, e.g. "Pass", or Excel returns a #NAME? error.
  • Using an odd number of arguments. Every condition needs a matching result; a missing result causes a #VALUE! or #N/A error.
  • Assuming IFS works in old Excel. In Excel 2016 and earlier the function is unavailable and shows #NAME?. Use nested IF or IFERROR instead.
  • Mixing up commas and semicolons. Some regional settings use semicolons as the argument separator; if your version does, type =IFS(A2>=90; "A"; ...).

Tips

  • Keep conditions in ascending or descending order consistently so the logic is easy to audit.
  • Use cell references for thresholds (e.g. A2>=$F$1) so you can change cut-offs without editing the formula.
  • Wrap IFS in IFERROR if you want a custom message instead of an error: =IFERROR(IFS(...), "Check input").
  • For simple two-outcome tests, plain IF is shorter and easier to read; reach for IFS when you have three or more branches.
  • Press Alt+Enter (Windows) or Ctrl+Option+Enter (Mac) inside the formula bar to add line breaks between pairs for readability.

Troubleshooting

If the formula returns #NAME?, your Excel version likely does not support IFS, or the function name is misspelled. Confirm your version under File > Account. If IFS is unavailable, rewrite the logic as nested IFs: =IF(A2>=90,"A",IF(A2>=80,"B",IF(A2>=70,"C",IF(A2>=60,"D","F")))).

If you see #N/A, no condition matched and there is no catch-all pair; add TRUE, "your default" at the end. If you see #VALUE!, check that every condition is a logical test and every result is present. If results look wrong, re-read the order of pairs: the first TRUE wins. If the formula shows as text instead of calculating, the cell is formatted as Text; change the format to General and re-enter the formula.

If copying the formula gives wrong results in other rows, check for accidental absolute references (dollar signs) that should be relative, or vice versa.

Frequently Asked Questions

What is the maximum number of conditions IFS can handle?

Excel allows up to 127 condition/result pairs in an IFS formula. In practice, more than a handful becomes hard to read, so consider a lookup table with VLOOKUP or XLOOKUP for large rule sets.

Does IFS work in Excel 2016?

No. IFS was introduced in Excel 2019 and is available in Excel for Microsoft 365 and Excel for the web. In Excel 2016 and earlier it returns #NAME?; use nested IF instead.

Can I use IFS with text conditions?

Yes. For example, =IFS(A2="Yes","Approved",A2="No","Declined",TRUE,"Pending"). Text comparisons are not case-sensitive by default.

What happens if two conditions are both TRUE?

IFS returns the result of the first TRUE pair only and ignores the rest. Order your pairs carefully so the most specific or strictest condition comes first.

Can I combine IFS with AND or OR?

Yes. Use AND or OR inside a condition, e.g. AND(A2>=60,A2<70), "D". Each condition still needs its own matching result.

Why does my IFS formula return #N/A for blank cells?

A blank cell is treated as 0 in numeric comparisons, so it may fail every threshold. Add a check such as A2="", "No data" as the first pair to handle blanks explicitly.