8.3 C
London
Tuesday, March 11, 2025
HomeSoftware TutorialsGoogle SheetsGoogle Sheets: How to Filter a Column by Multiple Values

Google Sheets: How to Filter a Column by Multiple Values

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 formula to filter a column by multiple values in Google Sheets:

=FILTER(A1:C11, REGEXMATCH(A1:A11, "string1|string2|string3"))

This particular formula will filter the rows in the range A1:C11 to only show the rows where the value in the range A1:A11 is equal to either string1, string2, or string3.

The following example shows how to use this formula in practice.

Example: Filter Column by Multiple Values in Google Sheets

Suppose we have the following dataset that contains information about various basketball players:

Now suppose we’d like to filter the dataset to only show rows where the Team column contains Heat or Celtics.

To do so, we can use the following formula:

=FILTER(A1:C11, REGEXMATCH(A1:A11, "Heat|Celtics"))

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

Google Sheets filter column by multiple values

Notice that the filtered dataset only contains the rows where the team is equal to Heat or Celtics.

Also note that you can filter for rows where the team name is not equal to Heat or Celtics by using the NOT function outside of the REGEXMATCH function as follows:

=FILTER(A1:C11, NOT(REGEXMATCH(A1:A11, "Heat|Celtics")))

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

Notice that the filtered dataset only contains the rows where the team is not equal to Heat or Celtics.

Additional Resources

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

Google Sheets: How to Filter Using Custom Formula
Google Sheets: How to Filter from Another Sheet
Google Sheets: How to Filter with Multiple Conditions

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