NESTED IF Function In Google Sheets

What Is NESTED IF Function In Google Sheets?

Nested IF function in Google sheets is nothing but having an IF formula within another IF Function formula. It is useful while we have to get the results based on multiple conditions.

Nested IF function in Google sheets formula works in the same way as IF Function in Google sheets and provides a result based on logical expressions.

For example, consider the below table showing name and experience in columns A and B, respectively.

NESTED-IF-Function-In-Google-Sheets-Definition

Now, let us find the result whether the employees are interns, junior executives or senior executives using nested IF function in Google sheets.

The steps are:

Step 1: To start with, insert the data in the spreadsheet. In this example, the data is available in the cell range A1:C6. Next, select the cell where we want to find the result. In this example, select the cell C2.

Step 2: Next, insert the IF function and create a nested IF function.

So, the complete formula is =IF(B2=0,”Intern”,IF(B2<5,”Junior Executive”,”Senior Executive”))

Step 3: Press Enter key.

We can see the result in the cell C2. Using AutoFill, we will be able to see the result in all cells, as shown in the below image.

NESTED-IF-Function-In-Google-Sheets-Definition-Step-3-1

Likewise, we can use nested IF function in Google sheets.

In this article, let us learn about nested IF function in Google sheets with detailed examples.

Key Takeaways
  • Nested IF function in Google sheets is using IF function within IF function formula to get desired results using multiple conditions.
  • The syntax of IF function is =IF(logical_expression,value_if_true,value_if_false) where logical expression is the condition used to check the data.
  • The value_if_true and value_if_false are conditions that the IF function will return based on the logical test.
  • The nested IF function uses the same arguments but contains IF function formula within the IF function formula.
  • Users can use the nested IF function with the same use in both Excel and Google sheets.

Syntax

The syntax of nested IF function is

IF(logical_test,[value_if_true],[value_if_false],( logical_test,[value_if_true],[value_if_false]))

where,

  1. logical expression is the condition which we need to use to check the data.
  2. The value_if_true and value_if_false are the arguments or the conditions that the IF function will return based on the logical test.

How To Use Nested IF Function In Google Sheets ?

We can use the nested IF function with the help of following steps.

The steps are:

Step 1: To start with, insert the data in the spreadsheet. Next, select the cell where we want to find the result.

Step 2: Next, insert the IF function and create a nested IF function.

Step 3: Press Enter key.

We can see the result in the active cell.

Likewise, we can use nested IF function.

Examples

Let us learn how to use nested IF function with detailed examples.

Example #1 – Find The Highest Number

For example, consider the below table showing region and numbers in columns A and B, respectively.

NESTED-IF-Function-In-Google-Sheets-Example-1

Now, let us find the result whether the numbers are null, lowest number or highest number using nested IF function.

The steps are:

Step 1: To start with, insert the data in the spreadsheet. In this example, the data is available in the cell range A1:C5. Next, select the cell where we want to find the result. In this example, select the cell C2.

Step 2: Next, insert the IF function and create a nested IF function.

So, the complete formula is =IF(B2=0,”Null”,IF(B2<50,”Lowest Number”,”Highest Number”))

Step 3: Press Enter key.

We can see the result in the cell C2, as shown in the below image.

Example-1-Step-3

Now, let us use the AutoFill option to find the result in cells C3:C5, as shown in the below image.

Example-1-Step-3-1

Likewise, we can use nested IF function.

Example #2 – Check Groceries And Create A Shopping List

For example, consider the below table showing groceries and quantity (in Kg) in columns A and B, respectively.

NESTED-IF-Function-In-Google-Sheets-Example-2-1

Now, let us find the result whether the grocery items are stocked, available or add to list using nested IF function in Google sheets.

The steps are:

Step 1: To start with, insert the data in the spreadsheet. In this example, the data is available in the cell range A1:C5. Next, select the cell where we want to find the result. In this example, select the cell C2.

Step 2: Next, insert the IF function and create a nested IF function.

So, the complete formula is =IF(B2=1,”Stocked”,IF(B2<5,”Available”,”Add to List”))

Step 3: Press Enter key.

We can see the result in the cell C2, as shown in the below image.

Example-2-Step-3

Now, let us use the AutoFill option to find the result in cells C3:C5, as shown in the below image.

Example-2-Step-3-1

Likewise, we can use nested IF function.

Example #3 – Select Passing Students And Assign Grades

For example, consider the below table showing name and experience in columns A and B, respectively.

NESTED-IF-Function-In-Google-Sheets-Example-3-1

Now, let us find the result whether the students have passed, failed or scored distinction using nested IF function in Google sheets.

The steps are:

Step 1: To start with, insert the data in the spreadsheet. In this example, the data is available in the cell range A1:C5. Next, select the cell where we want to find the result. In this example, select the cell C2.

Step 2: Next, insert the IF function and create a nested IF function.

So, the complete formula is =IF(B2=40,”Pass”,IF(B2<40,”Fail”,”Distinction”))

Step 3: Press Enter key.

We can see the result in the cell C2, as shown in the below image.

Example-3-Step-3

Now, let us use the AutoFill option to find the result in cells C3:C5, as shown in the below image.

Example-3-Step-3-1

Likewise, we can use nested IF function.

Important Things To Note

  1. Nested IF function helps users analyse data with multiple conditions.
  2. Users can use this function if there are multiple conditions to test logically.
  3. Remember, we need to use the correct arguments in the nested IF Function to avoid errors.

Frequently Asked Questions (FAQs)

1. Explain nested IF function in Google sheets with detailed example.

For example, consider the below table showing name and experience in columns A and B, respectively.
FAQ-1
Now, let us find the result whether the employees are interns, junior executives or senior executives using nested IF function in Google sheets.
The steps are:
Step 1: To start with, insert the data in the spreadsheet. In this example, the data is available in the cell range A1:C6. Next, select the cell where we want to find the result. In this example, select the cell C2.
Step 2: Next, insert the IF function and create a nested IF function.
So, the complete formula is =IF(B2=0,”Intern”,IF(B2<5,”Junior Executive”,”Senior Executive”))
Step 3: Press Enter key.
We can see the result in the cell C2. Next, using AutoFill option, we can see the results in the cell range C3:C5, as shown in the below image.
FAQ-1-Step-3
Likewise, we can use nested IF function in Google sheets.

2. What is the difference between IF and nested IF function in Google sheets?

The difference between IF and nested IF function in Google sheets are:
• If function is a default function used to test the value and return results using logical tests.
• Nested IF function is a combination of IF function within IF function in Google sheets used to find results with multiple conditions.

3. Why nested IF function is not working?

Nested IF function in Google sheets may not work if,
• The number of arguments are not inserted correctly
• The values do not match with the arguments mentioned in the formula

Download Template

This article must help understand NESTED IF Function In Google Sheets with its formulas and examples. You can download the template here to use it instantly.

Guide to What is NESTED IF Function In Google Sheets. We learn definition, how to use NESTED IF Function In Google Sheets. You can learn more from the following articles. –

100 Stacked Bar Chart In Google Sheets

COUNTIF Function In Google Sheets

Tree Map Chart In Google Sheets

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *