IFS(condition1, value1, [condition2, value2], …)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
condition1:
The first condition that you want to evaluate. This can be a logical expression that returns TRUE or FALSE.
value1:
The value that will be returned if condition1 is TRUE.
condition2:
The second condition that you want to evaluate (optional). This can also be a logical expression.
value2:
The value that will be returned if condition2 is TRUE (optional).
...:
Additional pairs of conditions and values can be added as needed, following the same pattern.
The IFS function in Google Sheets is a logical function that allows you to evaluate multiple conditions and return a value corresponding to the first true condition. It is a more efficient alternative to using multiple nested IF statements, making your formulas cleaner and easier to read. The IFS function is particularly useful when you have several conditions to check and want to avoid the complexity of nested IFs.
In simpler terms, IFS lets you check various conditions in a straightforward manner and return a specific result based on the first condition that is met.
Imagine you are grading students based on their scores stored in a Google Sheets document:
| StudentID | StudentName | Score |
|---|---|---|
| 1 | Alice | 85 |
| 2 | Bob | 70 |
| 3 | Charlie | 90 |
| 4 | David | 60 |
You want to assign a grade based on the score:
To achieve this, you would use the IFS function as follows:
=IFS(C2 >= 85, "A", C2 >= 70, "B", C2 >= 60, "C", C2 < 60, "D")In this formula:
C2 is the cell containing the Score for each student.When you apply the IFS formula to the Scores Table, the output would look like this:
| StudentID | StudentName | Score | Grade |
|---|---|---|---|
| 1 | Alice | 85 | A |
| 2 | Bob | 70 | B |
| 3 | Charlie | 90 | A |
| 4 | David | 60 | C |
In this case, the IFS function evaluates each student's score and assigns the appropriate grade based on the defined conditions.
IFS is beneficial because it simplifies the process of evaluating multiple conditions in Google Sheets. It reduces the complexity of nested IF statements, making your formulas easier to read and maintain. Additionally, it allows for a more organized approach to conditional logic, which can enhance the clarity of your spreadsheets.
The IFS function is an essential tool for anyone working with data in Google Sheets, providing a powerful way to streamline conditional logic and enhance data analysis capabilities.
Happy spreadsheeting!
You have a grading table where Column A lists student scores. Use the IFS formula in Column B to assign letter grades: A for 90+, B for 80-89, C for 70-79, and so on. This automates grade assignment based on score ranges, streamlining the grading process.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.