Back to Functions

IFS

Evaluates multiple conditions and returns a value that corresponds to the first true condition.

LogicalIFS(condition1, value1, [condition2, value2], …)

IFS evaluates a list of conditions in order and returns the value that goes with the first one that is true. It replaces long chains of nested IF with a flat list of "if this, then that" pairs that is far easier to read and edit.

Syntax

=IFS(condition1, value1, [condition2, value2, ...])
  • condition1: The first test.
  • value1: The result if condition1 is TRUE.
  • condition2, value2, ... [Optional]: More test/result pairs, checked in order.

IFS stops at the first true condition. It takes pairs only: every condition needs its own value.

Basic example

Turning a score in A1 into a grade:

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

Compare this with the nested version, IF(A1>=90,"A",IF(A1>=80,"B",IF(A1>=70,"C",IF(A1>=60,"D","F")))). Same logic, but each case is on its own and there are no trailing parentheses to count.

The default case: end with TRUE

If no condition is true, IFS returns #N/A. There is no built-in "else". To provide one, finish with the condition TRUE, which is always true, followed by the fallback:

=IFS(B2 = "Gold", 0.2, B2 = "Silver", 0.1, TRUE, 0)

Customers who are neither Gold nor Silver get 0. Because IFS goes in order, the TRUE pair is only reached when nothing earlier matched, so it must be last.

Order matters

Conditions are checked top to bottom, and the first match wins. For range tests such as grades, list the strictest condition first:

=IFS(A1 >= 90, "A", A1 >= 80, "B")

If you wrote A1 >= 80 first, a score of 95 would return B.

Practical patterns

Banded pricing or tax tiers

=IFS(B2 <= 10000, B2 * 0.1, B2 <= 50000, B2 * 0.2, TRUE, B2 * 0.3)

Multiple fields in one test

Use AND and OR to build richer conditions:

=IFS(AND(B2 > 100, C2 = "Yes"), "Priority", B2 > 100, "Standard", TRUE, "Low")

Status labels from dates

=IFS(D2 = "", "No date", D2 < TODAY(), "Overdue", D2 = TODAY(), "Due today", TRUE, "Upcoming")

Fill a whole column

=ARRAYFORMULA(IFS(A2:A >= 90, "A", A2:A >= 80, "B", A2:A >= 70, "C", A2:A <> "", "F"))

Rows where A2:A is empty fail every test and return #N/A. Wrap the formula in IFERROR(..., "") to hide those, or add a first condition A2:A = "", "".

Common errors

  • #N/A: "No matches are found in IFS evaluation". None of the conditions was true and there is no TRUE fallback. Add TRUE, "default" at the end.
  • "Wrong number of arguments to IFS. Expected an even number of arguments". A condition lacks a value, or a value lacks a condition. Count the arguments: they must come in pairs.
  • Wrong result for values that meet several conditions. Order problem: IFS returns the first true pair.
  • #NAME?. Text without quotes. Write "Gold", not Gold.

IFS vs. IF vs. SWITCH vs. lookup tables

  • IF is best for a single test.
  • IFS is best for several different conditions, especially ranges or comparisons.
  • SWITCH is best when you compare one value against exact matches ("US", "UK", "FR").
  • A lookup table with XLOOKUP or VLOOKUP is better when the rules change often or number more than about five, since you edit a table instead of a formula.

Frequently asked questions

Does IFS evaluate all conditions? It stops at the first true one.

How many conditions can I use? Many, but readability suffers beyond about five or six. Consider a lookup table.

Is there a default value argument? No. Use TRUE, value as the last pair.

Can the values be formulas? Yes. Any value can be a calculation or another function.

Related Functions

  • IF: One test with two outcomes.
  • SWITCH: Match one value against a list of exact cases.
  • IFERROR: Replace an error with a fallback value.
  • AND: Check if all arguments are TRUE.
  • OR: Check if any argument is TRUE.

Related Articles

Newsletter

More IFS examples coming soon.

We are building short, practical updates for Sheets power users.