How to Use the IFS Function in Google Sheets | Evaluate Multiple Conditions in Order
How to Use the IFS Function
The IFS function is a logical function that evaluates multiple conditions from left to right and returns the value corresponding to the first condition that evaluates to TRUE. It allows you to write multiple conditional branches cleanly without deeply nesting IF functions.
Syntax
=IFS(condition1, value1, [condition2, value2, ...])
- condition1: The first logical expression to evaluate (required).
- value1: The value to return if
condition1isTRUE(required). - condition2, value2, …: Additional pairs of conditions and return values, as many as needed (optional).
Table Example
Here is an example of assigning a grade rank (S, A, B, or C) based on the scores in the table below.
| Row | Column A (Name) | Column B (Score) | Column C (Grade Rank) |
|---|---|---|---|
| 1 | Name | Score | Grade Rank |
| 2 | Shimizu | 95 | =IFS(B2>=90, "S", B2>=80, "A", B2>=70, "B", TRUE, "C") → S |
| 3 | Yamazaki | 82 | =IFS(B3>=90, "S", B3>=80, "A", B3>=70, "B", TRUE, "C") → A |
| 4 | Mori | 64 | =IFS(B4>=90, "S", B4>=80, "A", B4>=70, "B", TRUE, "C") → C |
- Formula:
=IFS(B2>=90, "S", B2>=80, "A", B2>=70, "B", TRUE, "C")
Common Errors and Notes
#N/Aerror when no condition matches: If all conditions evaluate toFALSE, an#N/A(no match found) error is returned. To prevent this, always add a default fallback likeTRUE, "N/A"at the end.- Pay attention to the order of conditions: If you place a looser condition first—such as
=IFS(B2>=70, "B", B2>=90, "S")—a score of 95 will satisfyB2>=70first and return"B". When narrowing down ranges, always list the strictest conditions (highest or lowest thresholds) first.
Frequently Asked Questions
Q. How do I specify an "ELSE (if none of the conditions match)" case in the IFS function?
A. Use "TRUE" as the final condition (e.g., "=IFS(A2>=80, \"A\", A2>=60, \"B\", TRUE, \"C\")"). This sets a default value when all preceding conditions evaluate to FALSE.
Q. If multiple conditions are met in an IFS function, which value is returned?
A. Conditions are evaluated from left to right, and the value corresponding to the "first condition that evaluates to TRUE" is returned. Therefore, the order of conditions is critical when comparing numeric ranges.