Wondering how to use multiple IF statements in one cell in Google Sheets?
Yes, you are at the right place to learn about how to use Google Sheets multiple if statements in one cell.
You can nest multiple IF statements together in Google Sheets to check your data and return various values based on the findings. This is a very valuable skill to learn.
In this guide, we’ll cover the following topics.
We will discuss each of these in detail below.
How to use IF Statements in Google Sheets?
The IF statement checks whether your expression is TRUE or FALSE. The IF function evaluates your cells and returns a value.
The syntax of the IF statement in Google Sheets is as below:
IF(logical_expression1, value_if_true1, value_if_false1)
Logical_expression1: this refers to the expression your formula is evaluating. To compare numbers, you can use any of your regular logical operators as well as additional cell references in your statement.
value_if_true1: If your expression returns TRUE, put the value you want to return here. This is enclosed in quotation marks.
value_if_false1: Like the value_if_true1 parameter, you can also keep a value you want to return in quotation marks.
Here is an example of an IF function. In this example, we are checking whether the students having the below-mentioned grade is failed or passed the exam.
Here, we are referring to cell (D4) to see if it is greater than 30. The second parameter is set to “PASS” if this expression evaluates to TRUE. The third parameter is set to return “FAIL” if this expression evaluates to FALSE.
How to use Multiple IF statements in one cell in Google Sheets?
You can create a nested IF statement by combining multiple IF statements. You’ll be able to evaluate multiple expressions and return a different value depending on the outcome.
The syntax of nested IF statement is:
IF(logical_expression1, value_if_true1, IF(logical_expression2, value_if_true2, IF(logical_expression3, value_if_true3, value_if_false1)))
You can use this formula to connect multiple IF statements.
If your logical expression evaluates to true, your formula will return your value_if_true1. If your logical expression evaluates to false, the next IF statement will then start to be evaluated.
You can combine as many IF statements as you want, and if none of them returns true, it will return your designated value_if_false1.
We will explain the Mutliple IF statement with an example.
Assume we have the following columns in Google Sheets, which show the grade and student’s Pass/Fail status.
To classify the grade of students, we can use the following syntax to create multiple IF statements as “Poor”, “AVERAGE”, “EXCELLENT”, or “ABOVE AVERAGE”.
=IF(D4<25, “POOR”, IF(D4<35, “AVERAGE”, IF(D4>40, “EXCELLENT”, “ABOVE AVERAGE”)))
The below illustration shows how to use the syntax:
From the above example, we can see that it returns the word “POOR” if the value in cell D4 is less than 25.
If the cell D4 value is less than 35, however, return “AVERAGE” in all other cases.
If the cell D4 value is greater than 40, however, return “EXCELLENT” in all other cases. Otherwise, they will return “Above Average” in all other cases.
How to use Multiple IF statements using IFS Function?
It may get difficult and time-consuming to use several IF statements, but fortunately, Google Sheets offers a built-in function that lets you nest IF statements.
As a result, the IFS functions are mentioned. This approach is similar to IF, with the exception that you can check for many conditions at once.
Here is the syntax of the IFS function:
IFS (condition_1, value_1, [condition_2, value_2,…])
condition_1: You are evaluating the expression.
value_1: If your condition evaluates to TRUE, this is the value that will be returned.
condition_2, value_2: You can add further conditions and values here if condition 1 evaluates to FALSE before going on to the next condition.
Here is an example of how to use the IFs function.
To classify the students by grade as “A,” “B,” “C,” etc… we can follow the syntax of the IFS statement:
=IFS(A2<60, “F”, A2<70, “D”, A2<80, “C”, A2<90, “B”, A2>89, “A”)
In the example above, we are going to evaluate the grade of the students based on their scores. The formula will come to an end if the first condition is TRUE. The formula, however, will continue on evaluating the remaining conditions if the initial condition is FALSE.
The IFS function makes it much simpler to combine many IF statements in a single cell.
Because we don’t have to write several nested IF statements, this syntax is significantly easier to write.
Hope you got an idea about how to use Google Sheets with multiple if statements in one cell.
In this guide, we have looked at how to use Google Sheets with multiple if statements in one cell and the IFS function.
Kindly let us know if you have any queries.