How to Use the IFS Function in Excel

Formulas & functions · Updated November 30, 2026

The IFS function in Excel checks multiple conditions and returns a value for the first condition that is TRUE. It’s a cleaner alternative to nested IF functions, especially when you have several logical tests. For example, to assign a letter grade based on a score in cell A1, you’d write =IFS(A1>=90,"A",A1>=80,"B",A1>=70,"C",A1>=60,"D",TRUE,"F"). This guide walks you through using IFS, common pitfalls, and troubleshooting.

What You’ll Need

  • Microsoft Excel 2019, Excel 2021, Excel 2024, or Microsoft 365 (IFS is not available in Excel 2016 or earlier).
  • A worksheet with at least one cell containing a value you want to evaluate.
  • Basic familiarity with typing formulas and using cell references.

Step-by-Step

  1. Choose the cell for the result. Click the cell where you want the IFS formula to appear. For this example, we’ll use cell B2.
  2. Start the formula. Type =IFS( in the cell. Excel will show a tooltip with the syntax: IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...).
  3. Enter your first logical test. Type the first condition followed by a comma. For instance, if you’re grading a score in A2, type A2>=90,. The test can be any expression that returns TRUE or FALSE, such as B2="Yes" or C2>100.
  4. Enter the value for that test. After the comma, type the value to return if the test is TRUE. This can be text (in double quotes), a number, a cell reference, or another formula. For example, type "A". Then add a comma.
  5. Add more test/value pairs. Continue with A2>=80,"B",, A2>=70,"C",, and so on. Each pair must be separated by a comma. You can have up to 127 pairs.
  6. Include a catch-all for unmatched cases (optional but recommended). To handle values that don’t meet any test, use TRUE as the final logical test, followed by a default value. For example, TRUE,"F" returns “F” for any score below 60.
  7. Close the parentheses and press Enter. Type ) and press Enter. The result appears in the cell. For a score of 85 in A2, the formula =IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",A2>=60,"D",TRUE,"F") returns “B”.
  8. Copy the formula down (if needed). If you have scores in A2:A10, drag the fill handle (the small square at the bottom-right of the cell) down to copy the formula to B3:B10. Excel automatically adjusts the cell references relative to each row.

Common Mistakes

  • Forgetting the final TRUE condition. If no test is TRUE and you don’t include a TRUE test, Excel returns a #N/A error. Always add a TRUE catch-all unless you’re certain every possible value matches a test.
  • Using text without quotes. Text values must be enclosed in double quotes, like "Pass". Writing Pass without quotes causes a #NAME? error.
  • Misordering conditions. IFS evaluates tests in the order you list them, and returns the value for the first TRUE test. If you put A2>70 before A2>80, a score of 85 would return the “C” value because 85>70 is TRUE first. Always order tests from most specific to least specific (e.g., highest to lowest).
  • Using commas instead of semicolons in some locales. In European versions of Excel, the argument separator is a semicolon (;). If you get a formula error, check your regional settings and replace commas with semicolons.
  • Forgetting to close parentheses. Each IFS function needs a closing parenthesis. Excel usually helps with auto-correction, but a missing one causes a syntax error.

Tips

  • Use cell references for values. Instead of hardcoding numbers like 90, put the threshold in a cell (e.g., E1) and reference it: A2>=E1. This makes the formula easier to update.
  • Combine with other functions. IFS can return a formula, such as IFS(A2>0, A2*2, TRUE, 0). It can also be nested inside other functions like SUM or AVERAGE.
  • Use IFS for text conditions. For example, =IFS(B2="Red","Stop",B2="Yellow","Caution",B2="Green","Go",TRUE,"Invalid").
  • Consider SWITCH for exact matches. If you’re matching exact values (like “Red”, “Yellow”, “Green”), the SWITCH function is simpler: =SWITCH(B2,"Red","Stop","Yellow","Caution","Green","Go","Invalid").
  • Test with a few values. After entering the formula, try different inputs to verify each condition returns the expected result.

Troubleshooting

  • Formula returns #N/A. This means no test was TRUE and you didn’t include a TRUE catch-all. Add a final TRUE, with a default value (e.g., TRUE,"Not found").
  • Formula returns #NAME?. This usually means you typed a text value without quotes, or the function name is misspelled. Check that all text values are in double quotes and the function is spelled IFS.
  • Formula returns #VALUE!. This often happens when comparing incompatible data types, like text to a number. Ensure your logical tests compare the correct types. For example, if A2 contains text, A2>=90 will error.
  • Formula returns the wrong result. Check the order of your conditions. Remember, IFS stops at the first TRUE test. Reorder from most specific to least specific.
  • IFS is not available. If you get a #NAME? error and you’re on Excel 2016 or earlier, IFS isn’t supported. Use nested IF instead: =IF(A2>=90,"A",IF(A2>=80,"B",IF(A2>=70,"C",IF(A2>=60,"D","F")))).
  • On Mac, the formula works but shows a different separator. Mac Excel uses commas by default, but if you see semicolons, go to Excel > Preferences > Formulas and uncheck “Use system separators” to adjust.

Frequently Asked Questions

Can I use IFS with dates? Yes. For example, to categorize due dates: =IFS(A2>TODAY(),"Upcoming",A2=TODAY(),"Due today",A2. Ensure the cells contain real dates, not text.

What is the maximum number of conditions in IFS? You can have up to 127 pairs of logical_test and value_if_true. In practice, you'll rarely need that many; if you do, consider simplifying your logic.

Can I use IFS to return a blank cell? Yes, use an empty string: =IFS(A2>10,"",TRUE,"Low"). The cell will appear blank but still contain a formula.

Is IFS faster than nested IF? IFS is generally easier to read and maintain, and it can be slightly faster because it evaluates only until the first TRUE condition. However, the performance difference is negligible for typical datasets.

Does IFS work in Excel for the web? Yes, IFS is supported in Excel for the web (Microsoft 365) and Excel mobile apps.

Can I use IFS with wildcards? No, wildcards (* and ?) are not supported in IFS logical tests. For wildcard matching, use functions like COUNTIF, SUMIF, or SEARCH.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.