Search Contextures Sites ![]()
Excel -- Filters -- Advanced Filters -- Introduction
1. Advanced Filters--Introduction
a) Apply an Advanced Filter
b) Filter Unique Records
c) Extract Data to Another Worksheet
d) Setting up the Criteria Range
e) Using Wildcards in Criteria
f) Criteria Examples
2. Advanced Filters -- Complex Criteria
Apply an Advanced Filter1. Set up the database
For a zipped workbook with sample data and criteria, click here.
2. Set up the Criteria Range (optional)
In the criteria range, you can set the rules for the data that should remain visible after the filter is applied. You can use one criterion, or several.
- In this example, cells F1:F2 are the criteria range.
- The heading in F1 exactly matches a heading (D1) in the database.
- Cell F2 contains the criterion. The > (greater than) operator is used, with the number 500 (no $ sign is included)..
After the filter is applied, orders with a total greater than $500 will remain visible.
Other operators include:
< less than
<= less than or equal to
>= greater than or equal to
<> not equal to
3. Set up the Extract Range (optional)If you plan to copy the data to another location, you can specify the columns that you want to extract. If you want to extract ALL columns, you can leave the extract range empty.
4. Apply the Filter
- Select a cell in the database.
- From the Data menu, choose Filter, Advanced Filter. (In Excel 2007, click the Data tab on the Ribbon, then click Advanced Filter.)
- You can choose to filter the list in place, or copy the results to another location.
- Excel should automatically detect the list range. If not, you can select the cells on the worksheet.
- Select the criteria range on the worksheet
- If you are copying to a new location, select a starting cell for the copy
Note: If you copy to another location, all cells below the extract range will be cleared when the Advanced Filter is applied.- Click OK
Filter Unique Records
You can use an Advanced Filter to extract a list of unique items in the database. For example, get a list of customers from an order list, or compile a list of products sold:Note: The list must contain a heading, or the first item may be duplicated in the results.
- Select a cell in the database.
- From the Data menu, choose Filter, Advanced Filter.(In Excel 2007, click the Data tab on the Ribbon, then click Advanced Filter.)
- Choose 'Copy to another location'.
- For the List range, select the column(s) from which you want to extract the unique values.
- Leave the Criteria Range blank.
- Select a starting cell for the Copy to location.
- Add a check mark to the Unique records only box.
- Click OK.
Watch the Video
View the steps described above, in a short video clip. Excel 2007 video
Extract Data to Another WorksheetIf the database is on Sheet1 and you would like to extract data to Sheet2:
- Go to Sheet 2
- Select a cell in an unused part of the sheet (cell C4 in this example).
- From the Data menu, choose Filter, Advanced Filter.(In Excel 2007, click the Data tab on the Ribbon, then click Advanced Filter.)
- Choose Copy to another location.
- Click in the List Range box
- Select Sheet 1, and select the database.
- (optional) Click in the Criteria range box.
- Select the criteria range
- Click in the Copy to box.
- Select the cell on Sheet 2 in which you want the results to start, or select the headings that you have typed on Sheet 2.
- (optional) Check the box for Unique Values Only
- Click OK
Watch the Video
View the steps described above, in a short video clip.
Use wildcard characters to filter for a text string in a cell.
The * wildcard
The asterisk (*) wildcard character represents any number of characters in that position, including zero characters.
In this example, any customer whose name contains "mart" will pass through the filter.
![]()
The ? wildcardThe question mark (?) wildcard character represents one characters in that position. In this example any 4-letter product that begins with c, and ends with ke, will pass through the filter.
![]()
Extract Items in a Range
To extract a list of items in a range, you can use two columns for one of the fields (e.g. Date). If you enter two criteria on the same row in the criteria range, you create an AND statement. In this example, any records that are extracted must be greater than the first date AND less than the second date.
Create Two or More Sets of Conditions
If you enter criteria on different rows in the criteria range, you create an OR statement.In this example, extracted records must meet both conditions in row 2 OR both conditions in row 3.
![]()
Extract Items with Specific Text
When you use text as criteria with an advanced filter, Excel finds all items that begin with that text. For example, if you type "Ice" as a criterion, Excel finds "Ice", "Ice Cream" and "Ice Milk"To extract only the records for Ice, use the following format:
="=Ice"
Related Topics:
Advanced Filters -- Complex Criteria
1. AutoFilter Basics
2. AutoFilter Tips
3. AutoFilter ProgrammingFor a zipped workbook with sample data and criteria, click here.