Home > Filters > Advanced > Criteria

Excel Filter Based on List Items

Debra Dalgleish - Contextures

See how to create an Excel filter based on list items, and other criteria. You can use an Advanced Filter, or the Excel FILTER function, to get records that have an exact or partial match.

advanced filter find in list

1) Excel Filter Based on List

For most filters in Excel, you use 1 or 2 criteria, and show the rows that contain those values. However, if you need to use more criteria, the examples below show how to set up a criteria list on a worksheet. After that, you can filter your data based on that criteria filter list.

There are 2 types of filter examples below:

  1. Filter rows that have an exact match for items in the criteria list
  2. Filter rows that have an exact or partial match for items in the criteria list

There are 3 methods for filtering the data:

  1. Advanced Filter (all versions of Excel)
  2. AutoFilter (exact match only, all versions of Excel)
  3. FILTER function (Excel 365 )

2a) Video: Advanced Filter - Exact Match

This video shows how to set up an Advanced Filter, with a list of criteria items on the worksheet. When the filter is applied, all rows with an exact match in the criteria list, and over the minimum total, are shown in the results. The Criteria Range steps are below the video.

2a.1) Advanced Filter Steps

There are 4 main steps for creating an Advanced Filter in Microsoft Excel:

  1. Set up the database -- a worksheet list or named Excel table
  2. Set up the Criteria Range (optional) - what should be filtered?
  3. Set up the Extract Range (optional) - send filter results to different location
  4. Apply the Excel Advanced Filter - filter the list, based on the criteria

Note: My video, in the section above, shows all 4 steps

2a.2) Step 1 - Advanced Filter Database

In this example, the database is a worksheet list of product sales, with 4 columns

  1. Date
  2. Customer
  3. Product
  4. Total

This is a small example, with only 14 rows of data.

advanced filter list of orders

For detailed steps on setting up a list, you can go to my Advanced Filter Introduction page, where you'll find written steps, screen shots and videos, to help you get started.

2a.3) Step 2 - Criteria Range - Exact Match

Two criteria are used in this advanced filter example:

  1. Total (column D) must be greater than 1000
  2. Product name (column C) must have an exact match in the criteria list (column I)

2a.3.1) Criteria List

First, to set up the criteria list, follow these steps:

  • In Column I, enter the list of items that you want to match exactly
    • Bread and Cookies are listed, in the screen shot below
    • Items can be added or removed from this list, as needed

advanced filter criteria list and criteria range

2a.3.2) Criteria Range

In the screen shot above, the Criteria Range is in cells F1:G2.

Each column in the criteria range has a heading cell, and a criteria cell, which can have text values or number filters.

Here is the list of criteria range cells, and their values:

  • F1: Criteria Heading -- Total
    • This is an exact match for the Total column (D) in the worksheet list
  • F2: Criterion:   >1000
  • G1: Criteria Heading -- Leave blank
    • This criterion is a formula, so the heading must be left blank
      • OR use text that is not a heading in the worksheet list
  • G2: Criteria:   =COUNTIF(I:I,C2)

2a.4) Run the Advanced Filter

After everything is set up, follow the steps below, to run the Excel Advanced Filter tool:

  • First, select any cell in the database (worksheet list) that you want to filter
  • On the Excel Ribbon, click the Data tab
  • In the Sort & Filter group, click the Advanced command, to open the Advanced Filter dialog box
  • For the Action, choose Filter the list, in place
  • Next, select the List range, and the Criteria range
  • Finally, click the OK button, to apply the Advanced Filter

advanced filter dialog box with list range and criteria range selected

2a.4,1) See the Results

On the worksheet, the list has been filtered, and only the heading cells, and the three data rows that meet the criteria are visible

  • The visible rows have blue row numbers.
    • That's a sign that the data has been filtered
  • All the other data rows in the worksheet list are hidden.

advanced filter dialog box with list range and criteria range selected

2a.4,2) Show the Full List

When you want to see the full list again, follow the steps below, to remove the filter:

  • First, select any visible cell in the filtered list
  • Next, on the Excel Ribbon, click the Data tab
  • In the Sort & Filter group, click the Clear button

Note: To reapply the Advanced Filter later, follow the steps to Run the Advanced Filter. (optional - You can change the criteria first, if needed)

Clear button on Excel Ribbon Data tab Sort & Filter group

2a.5) How It Works

In each record in the worksheet list, the two criteria are checked

  1. First, is the amount in the Total column greater than 1000?
  2. Next, is the Product name in the criteria list (column I)?
    1. If so, the COUNTIF formula will return a 1 (TRUE)
    2. If not, the COUNTIF formula will return a 0 (FALSE)

For each row of data, if both criteria are met, the record passes through the Excel advanced filter.

advanced filter criteria list and criteria range

2b) Advanced Filter - Partial Match

In this example, the worksheet setup is identical to the previous example - Advanced Filter - Exact Match, shown above. However, there is a different formula in criteria cell G2, shown below.

When the filter is applied, all rows with an exact or partial match in the criteria list, and over the minimum total, are shown in the results.

2b.1) Advanced Filter Criteria

Two criteria are used in this advanced filter example:

  • total must be greater than 100
  • product must contain an item in the list in column I, anywhere in the product cell

To set up the Criteria List:

  1. In Column I, enter the list of items that you want to match -- Bread and Cookies, in this example.
  2. Format the list as a named Excel Table, (tblFind in this example)
  3. Select the list of items in the table (do not select the heading cell)
  4. Click in the Name box, at the left of the Formula Bar
  5. Type a one-word name for the criteria list items - FindList
  6. Press Enter, to complete the name
    • NOTE: If you skip this step, the name is NOT create

To set up the Criteria Range and Formula:

  1. Enter the following values/formulas in the Criteria range:
    • F1: Criteria Heading -- "Total"
    • F2: Criteria:   >100
    • G1: Criteria Heading -- Leave blank
    • G2: Criteria:   =SUMPRODUCT(COUNTIF(C2,"*"& FindList &"*"))>0

2b.2) How the Formula Works

Here's how the criteria formula in cell G2 works

  • The COUNTIF function uses * (asterisk) wildcard characters, to represent any number of unknown characters, including zero, before and after the text in the criteria items
  • The SUMPRODUCT function calculates the total from the COUNTIF results
  • If the SUMPRODUCT total is greater than zero, an exact or partial match was found in the criteria list.

In each record, the formula checks the value in column C.

  • If that value contains an item from the list in column I,
  • AND the total is greater than 100,

the record passes through the Excel advanced filter.

advanced filter find in list

3) AutoFilter - Exact Match

If your data is in a named Excel Table, the headings have drop down lists, AutoFilters, where you can select one or more items to filter the list.

This type of filter is an  AutoFilter, and you can select criteria options from the drop down list.

  • Text Filters - Enter 1 or 2 criteria, with AND / OR as the operator
    • Type the criteria values into a dialog box
    • You cannot refer to worksheet cells for the criteria
  • Item List - Click check boxes to select one or more of the items in the column

AutoFilter criteria options

3.1) No Criteria Range Option

Unfortunately, an AutoFilter does not allow you to select a worksheet range as a criteria source, so there's no built-in way to use a worksheet criteria list.

However, I've created an AutoFilter Criteria List macro that you can download, and use it to filter your data, based on one or more criteria lists.

In the sample file, there are two criteria lists, for the Customer and Product columns in the main data table. You can add or remove items in those tables, as needed.

NOTE: Because of AutoFilter limitations, only exact matches for the criteria list items can be filtered.

criteria lists for AutoFilter macro

Beside the main data table, there are worksheet buttons that let you apply filters, based on those criteria lists, or clear all the filters.

click buttons to apply or clear filters

You can get the sample file in the Download section on this page, and the setup instructions and details are on the AutoFilter Criteria List Macro page.

4a) FILTER Function - Exact Match

In Excel 365, or other Excel versions that support the new Spill Functions, you can use the FILTER function to filter data, based on a criteria list.

In this example, there is a sales table named tblSales, and cell G2 has a criteria value, for the minimum sales Total.

In column I, the criteria list is like the Advanced Filter Partial Match setup, shown in a section above.

  • There is a named table, tblFind
  • Item cells in the table are a named range, FindList

Criteria for FILTER function

4a.1) FILTER Function Formula

In cell K2, there is a FILTER function formula, to return the sales order data, based on:

  • Minimum amount in cell G2
  • Items in the named range, FindList

Here is the formula in cell K2:

  • =FILTER(tblSales,(tblSales[Total]>=G2) * (COUNTIF(FindLIst,tblSales[Product])))

The results spill across to column N, and down as far as needed. The spill range is outlined with a blue border.

  • Note: I added the headers in row 1, to make the filtered data easy to understand

In the screen shot below, the orders for bread, milk and cookies, with a total over 500, are shown in the results.

  • Note: If you change the minimum amount, or add/remove items in column I, the formula results update automatically

Criteria for FILTER function

4b) FILTER Function - Partial Match

In Excel 365, or other Excel versions that support the new Spill Functions, you can also use the FILTER function to filter data for a partial match.

Download my FILTER function partial match workbook, to see two examples:

  1. One Item: Partial match, for criteria list with only one item
  2. Helper Column: Partial match, for source data with a helper column, to check for a list item partial match

Note: If you can't add a helper column, you could try Mike Girvin's solution that uses a long, complicated FILTER formula (YouTube video)

4b1) Criteria List - One Item

In the screen shot below, cell G2 is a criteria cell, where I've typed "co"

In cell G7, the following FILTER formula returns a list of unique products names, that contain the text string, "co"

  • =UNIQUE(FILTER(SalesProd, ISNUMBER(SEARCH(G2, SalesProd))))

Here's how the formula works:

  • The SEARCH function returns a number, if it finds "co" in the product name
  • If "co" is not found, SEARCH returns an error
  • The ISNUMBER function returns TRUE, if SEARCH returns a number
  • The FILTER function returns all the records where the ISNUMBER is TRUE
  • The UNIQUE function returns those product names, with any duplicates removed

Criteria for FILTER function partial match

4b2) Criteria List - Helper Column

In the screen shot below, there is a criteria list in column I, in a named Excel table - tblFind. There are two items in the list - "oat" and "cook"

  • Tip: You can add, remove or edit the items in the criteria table

In the product sales table, I've added a formula in column E:

  • =SUM(COUNTIFS([@Product],"*"& FindList &"*"))>0

The COUNTIFS function checks the product name, to see if it contains one or more of the text strings in the criteria list.

  • FindList is a named range, for the items in the tblFind table.
  • The asterisks are wildcard characters, to represent any number of characters before or after the text string.
  • If a string is found, COUNTIFS returns a count of one for that string
  • If the SUM of those counts is greater than zero, the formula result is TRUE

In cell G7, the following FILTER formula returns a list of unique products names, that contain the text string, "co"

  • =UNIQUE(FILTER(SalesProd, InList=TRUE))

Here's how the formula works:

  • The FILTER function returns all the records where the InList formula result is TRUE
  • The UNIQUE function returns those product names, with any duplicates removed

Criteria list for FILTER function partial match with helper column

5) Get the Excel Files ✅

Get Monthly Excel Tips!

Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.

Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!

More Tutorials

Advanced Filter Introduction

Advanced Filter Criteria

AutoFilter Basics

FILTER Examples

FILTER Function Reports

 

Last updated: July 14, 2026 3:56 PM