15.1 C
London
Friday, July 5, 2024
HomeSoftware TutorialsGoogle SheetsHow to Use Multiple IF Statements in Google Sheets

How to Use Multiple IF Statements in Google Sheets

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following basic syntax to write multiple IF statements in one cell in Google Sheets:

=IF(A210, "Bad", IF(A220, "Okay", IF(A230, "Good", "Great")))

Here’s what this syntax does:

  • If the value in cell A2 is less than 10, return the value “Bad”
  • Otherwise, if the value in cell A2 is less than 20, return the value “Okay”
  • Otherwise, if the value in cell A2 is less than 30, return the value “Good”
  • Otherwise, return the value “Great”

The following examples show how to use this syntax in practice.

Example 1: Use Multiple IF Statements in Google Sheets

Suppose we have the following column in Google Sheets that shows the points scored by various basketball players:

We can use the following syntax to write multiple IF statements to classify the players as “Bad”, “Okay”, “Good”, or “Great”:

=IF(A210, "Bad", IF(A220, "Okay", IF(A230, "Good", "Great")))

The following screenshot shows how to use this syntax in practice:

Multiple IF statements in Google Sheets

Each player receives a classification based on their number of points scored.

Example 2: Use IFS Function in Google Sheets

An easier way to write multiple IF statements is to simply use the IFS function.

We can use the following syntax to write an IFS statement to classify the players as “Bad”, “Okay”, “Good”, or “Great”:

=IFS(A210, "Bad", A220, "Okay", A230, "Good", A2>=30, "Great")

The following screenshot shows how to use this syntax in practice:

This produces the same results as the previous example.

Notice that this syntax is much easier to write because we don’t have to write several nested IF statements.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

Google Sheets: How to Use COUNTIF with Multiple Ranges
Google Sheets: How to Use SUMIF with Multiple Columns
Google Sheets: How to Check if Value is in Range

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories