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 statements — easier to write, read, and maintain. You don't need any special setup; just a worksheet with the data you want to evaluate. This guide walks you through the syntax, real examples, common mistakes, and troubleshooting.

What You'll Need

  • Microsoft Excel 2019 or later, or Microsoft 365 (IFS is not available in Excel 2016 or earlier).
  • A worksheet with the data you want to test (e.g., scores, sales figures, dates).
  • Basic familiarity with entering formulas and cell references.

Step-by-Step

Step 1: Understand the IFS Syntax

The IFS function has this structure:

=IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...)

You pair a condition with its result, then add more pairs. Excel evaluates them from left to right and returns the result for the first condition that is TRUE. If none are TRUE, it returns a #N/A error unless you add a final pair like TRUE, "default".

Step 2: Write a Simple IFS Formula

Suppose you have student scores in column A (A2:A10) and want letter grades. In cell B2, enter:

=IFS(A2>=90, "A", A2>=80, "B", A2>=70, "C", A2>=60, "D", TRUE, "F")

Press Enter, then drag the fill handle down to apply to other cells. The formula checks 90 first, then 80, and so on. The final TRUE catches any score below 60.

Step 3: Use Cell References and Text Results

You can return text, numbers, or even other formulas. For example, to label sales amounts in column A as "High" or "Low":

=IFS(A2>1000, "High", A2>500, "Medium", TRUE, "Low")

Make sure the result values are in quotes if they are text, and unquoted if they are numbers (e.g., 1, 0).

Step 4: Handle Multiple Conditions with AND/OR

Sometimes a single condition isn't enough. You can embed AND or OR inside IFS. For instance, to assign "Pass" only if score >= 50 AND attendance >= 80%:

=IFS(AND(A2>=50, B2>=80), "Pass", TRUE, "Fail")

Here B2 holds attendance percentage. The AND function returns TRUE only when both are true.

Step 5: Use IFS for Date Ranges

IFS works well with dates. To categorize orders by age:

=IFS(TODAY()-A2<=30, "New", TODAY()-A2<=60, "Recent", TRUE, "Old")

This checks if the order date in A2 is within 30 days, then 60 days, otherwise "Old".

Step 6: Add a Default Value to Avoid #N/A

If none of your conditions match, IFS returns #N/A. To avoid that, add a final pair with TRUE as the condition, like TRUE, "Other". This acts as an else clause.

Step 7: Use IFS with Other Functions

You can nest IFS inside other functions, such as SUM or AVERAGE, but more commonly you use it in a helper column. For example, to sum only "High" sales:

=SUMIF(B2:B10, "High", A2:A10)

Where column B contains the IFS result.

Common Mistakes

  • Forgetting the final TRUE pair — leads to #N/A when no condition matches.
  • Using text without quotes — e.g., writing High instead of "High" causes a #NAME? error.
  • Overlapping conditions — if you write A2>=90 and then A2>=80, the second will never trigger for values >=90 because the first catches them. Order matters.
  • Using IFS in older Excel — Excel 2016 and earlier don't support it; you'll get a #NAME? error.
  • Missing commas — each pair must be separated by a comma, and the arguments within a pair also need commas. A missing comma will break the formula.

Tips

  • Keep conditions in a logical order — from most specific to most general, or from high to low.
  • Use the Formula Bar's function wizard (fx) to insert IFS and see argument placeholders.
  • Test with a few sample values to confirm the results match your expectations.
  • If you have more than 7 conditions, consider using a lookup table with VLOOKUP or XLOOKUP instead — it's often simpler.
  • Use absolute references (e.g., $A$2) if you plan to copy the formula across rows/columns and want to keep certain references fixed.

Troubleshooting

IFS returns #N/A

This means no condition was TRUE. Add a final TRUE, "default" pair, or check your conditions — maybe you have a typo or the logic is inverted.

IFS returns #NAME?

Either you misspelled the function name, or your Excel version doesn't support IFS. Check the spelling and confirm you're on Excel 2019 or later. If you're on an older version, use nested IF instead: =IF(A2>=90,"A",IF(A2>=80,"B",...)).

IFS returns #VALUE!

This usually means a text value is used where a number is expected, or vice versa. For example, comparing a text cell with >=90 will produce #VALUE!. Ensure your data types are consistent.

Results are wrong but no error

Check the order of your conditions. IFS stops at the first TRUE, so if you put a broad condition before a specific one, the specific one may never be reached. Reorder from most specific to least.

Formula works but returns 0 or blank

If your result value is a number and you see 0, it might be that the condition is TRUE but the value is 0. If it's blank, you might have used empty quotes "" — that's fine, but it looks blank. To show a word, put text in quotes.

Frequently Asked Questions

Can I use IFS with wildcards?

No, IFS doesn't support wildcards like * or ?. For partial text matching, use SEARCH or LEFT/RIGHT inside the condition, or use XLOOKUP with wildcards.

What is the maximum number of conditions in IFS?

Excel allows up to 127 pairs of conditions and results. However, for readability, it's better to keep it under 10 or use a lookup table.

How is IFS different from nested IF?

IFS is shorter and doesn't require repeating the IF function. Nested IF can be more flexible for complex logic, but IFS is easier to read and less prone to parenthesis errors.

Does IFS work in Google Sheets?

Yes, Google Sheets has an IFS function with the same syntax. The steps in this guide apply there as well.

Can I use IFS to return a blank cell?

Yes, you can return an empty string by using "" as the result. For example: =IFS(A2>10, "Yes", TRUE, "").

What if I need to check a condition that involves text?

Use text in quotes, like A2="Pending". For case-insensitive matching, Excel treats text comparisons as case-insensitive by default.