Filters > Criteria Filter Excel Data Based on Criteria ListHow to filter Excel data based on criteria in worksheet list. Use Advanced Filter for exact or partial match. |
Filter Data Based on Criteria ListFor 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 list. There are 2 types of filter examples below:
There are 3 methods for filtering the data:
|
Advanced Filter - Exact MatchThis 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. Written steps are below the video.
Advanced Filter CriteriaTwo criteria are used in this advanced filter example:
To set up the Advanced Filter:
In each record, the value in column C is checked. If it is in the list
in column I, and the total is greater than 1000, the record passes through
the Excel advanced filter. |
Advanced Filter - Partial MatchIn this example, the worksheet setup is identical to the 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. Advanced Filter CriteriaTwo criteria are used in this advanced filter example:
To set up the Criteria List:
To set up the Criteria Range and Formula:
How the Formula WorksHere's how the criteria formula in cell G2 works
In each record, the formula checks the value in column C.
the record passes through the Excel advanced filter.
|
AutoFilter - Exact MatchIf 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.
No Criteria Range OptionUnfortunately, 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. Beside the main data table, there are worksheet buttons that let you apply filters, based on those criteria lists, or clear all the 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. |
FILTER Function - Exact MatchIn 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.
FILTER Function FormulaIn cell K2, there is a FILTER function formula, to return the sales order data, based on:
Here is the formula in cell K2:
The results spill across to column N, and down as far as needed. The spill range is outlined with a blue border. In the screen shot below, the orders for bread, milk and cookies, with a total over 500, are shown in the results.
|
Get the Sample FilesAdvanced Filter Exact: Get the Excel workbook used in the video, Advanced Filter Exact Match. The zipped workbook is in xlsx format, and does not contain any macros. AutoFilter Macro: To test the AutoFilter macro, download the Table Criteria List workbook. The zipped file is in xlsm format, and contains macros. Be sure to enable macros when you open the workbook, if you want to test the macros. FILTER Function Exact: To test the new FILTER function, download the FILTER Function from List workbook. The zipped file is in xlsx format, and does not contain any macros. More Tutorials |
Last updated: August 18, 2022 8:20 PM