11.7 C
London
Sunday, May 19, 2024
HomeSoftware TutorialsExcelHow to Filter by List of Values in Excel

How to Filter by List of Values in Excel

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 syntax to filter a dataset by a list of values in Excel:

=FILTER(A2:C11,COUNTIF(E2:E5,A2:A11))

This particular formula filters the cells in the range A2:C11 to only return the rows where cells in the range A2:A11 contain a value from the list of values in the range E2:E5.

The following step-by-step example shows how to use this syntax in practice.

Step 1: Enter the Data

First, let’s enter the following dataset in Excel that contains information about various basketball players:

Step 2: Define List of Values

Next, let’s define a list of Team values that we’d like to filter by:

Step 3: Filter by List of Values

Next, let’s type the following formula into cell A14 to filter the dataset by the list of Team names we defined:

=FILTER(A2:C11,COUNTIF(E2:E5,A2:A11))

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

Excel filter by list of values

Notice that the filtered dataset only contains the rows where the Team names from original dataset in the range A2:C11 are in the list of names in the range E2:E5.

Note: The FILTER function is case-insensitive. This means if you type “nets” instead of “Nets”, the function will still return the row with the “Nets” in the Team column.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

Excel: How to Use Wildcard in FILTER Function
Excel: How to Filter Cells that Contain Multiple Words
Excel: How to Count Filtered Rows

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