IFS function

IFS evaluates multiple logical tests in order and returns the first matching value, letting you replace nested IFs with a single readable formula.

=IFS(logical_test1, value1, ...)

Generate a IFS formula

Describe what you need. The generator will reach for IFS where IFS is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How IFS reads its arguments
logical_test1requiredvalue1requiredIFS
ArgumentRequiredDescription
logical_test1RequiredRequired; a Boolean expression (e.g., A2>100) that is evaluated first – if not TRUE, IFS moves to the next test.
value1RequiredRequired; the result returned when logical_test1 is TRUE – can be any data type, and is returned as-is.
...RepeatingOptional; additional pairs of logical_test/value arguments are evaluated sequentially; the list must contain an even number of items.

Returns

A single scalar value (text, number, or date) from the first true condition.

Availability

Excel: 2019+ · Google Sheets: Supported

Worked examples

1. Assign a commission tier based on region and units sold

Order IDRegionRepUnitsUnit PriceOrder Date
101EastAlice12015.52024-01-10
102WestBob160122024-02-05
103SouthCarol80202024-03-12
=IFS(B2="East", "East Tier", C2>150, "High Volume", TRUE, "Standard")

Result: East Tier

The first row is evaluated: B2 equals "East", so the first logical test is TRUE and IFS returns "East Tier" without checking later conditions. If the region were not East, the next test would compare Units (>150) and finally fall back to the default TRUE case.

2. Classify each order into its fiscal quarter

Order IDRegionRepUnitsUnit PriceOrder Date
101EastAlice12015.52024-01-10
102WestBob160122024-05-22
103SouthCarol80202024-11-03
=IFS(MONTH(F2)<=3,"Q1",MONTH(F2)<=6,"Q2",MONTH(F2)<=9,"Q3",TRUE,"Q4")

Result: Q1

For the first order the month extracted from the date (January = 1) satisfies the first condition (<=3), so IFS returns "Q1". The other rows would meet the second or fourth condition, but because the formula stops at the first true test each row gets the correct quarter label.

3. Flag high-value orders (total > $2,000)

Order IDRegionRepUnitsUnit PriceOrder Date
101EastAlice12015.52024-01-10
102WestBob160122024-05-22
103SouthCarol80202024-11-03
=IFS((D2*E2)>2000,"High Value",TRUE,"Regular")

Result: Regular

The total for the first order is 120 × 15.5 = 1,860, which does not exceed 2,000, so the first test is FALSE. IFS then evaluates the default TRUE condition and returns "Regular". If the total had been above the threshold, "High Value" would be returned.

Common errors

Which IFS error are you seeing?
IFS returned an error#N/A
Add a catch-all condition such as TRUE, "Other" at the end of the IFS argument list.
#VALUE!
Ensure every logical_test is paired with a value; add the missing value or remove the stray test.
#SPILL!
Clear the cells where the array result should spill, or wrap the formula in @ to force a single value.
ErrorWhy it happensHow to fix it
#N/AAll logical tests evaluate to FALSE and no final TRUE/default test is supplied.Add a catch-all condition such as TRUE, "Other" at the end of the IFS argument list.
#VALUE!An odd number of arguments is supplied, leaving a logical test without a corresponding value.Ensure every logical_test is paired with a value; add the missing value or remove the stray test.
#SPILL!The IFS formula is entered as an array that returns multiple results, but adjacent cells are occupied.Clear the cells where the array result should spill, or wrap the formula in @ to force a single value.

Tips and when to use something else

  • Place the most specific conditions first; IFS stops evaluating once a test is TRUE.
  • Use a final TRUE condition as a default fallback to avoid #N/A errors.
  • When you need only a single binary choice, IF is shorter and clearer than IFS.
  • If you have many mutually exclusive categories, consider SWITCH for a more compact syntax.

Frequently asked questions

Can I nest IFS inside another IFS?
Yes, you can embed an IFS call inside a value argument of another IFS, but readability suffers quickly. Often a single IFS with more conditions or a SWITCH is preferable.
Why does IFS return #N/A even though I expected a default result?
IFS only returns a default when you explicitly provide a final TRUE test. Without it, if none of the earlier tests are TRUE, the function raises #N/A. Adding TRUE,"Default" solves the issue.
How does IFS handle text comparisons?
Text comparisons are case-insensitive by default in Excel and Google Sheets. Use exact() if you need case-sensitivity, or compare numeric codes instead.
Is IFS faster than a long chain of IF statements?
Performance differences are negligible for typical worksheet sizes. IFS improves maintainability and reduces formula length, which can indirectly speed up debugging and future edits.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator