Filter by Using Advaa
Filter by Using Advaa
Page 1 of 27
Advanced Filter
Example
Overview
Wildcard criteria
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Advanced Filter
Page 2 of 27
Example
Overview
The Advanced command works differently from the Filter command in several important ways.
It displays the Advanced Filter dialog box instead of the AutoFilter menu.
You type the advanced criteria in a separate criteria range on the worksheet and above the
range of cells or table you want to filter. Microsoft Office Excel uses the separate criteria range in
the Advanced Filter dialog box as the source for the advanced criteria.
Example: Criteria range (A1:C4) and list range (A6:C10) used for the following procedures
procedures
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
Press CTRL+C.
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 3 of 27
2
A
Type
Salesperson Sales
Type
Salesperson Sales
5
Beverages Suyama
$5122
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
10
Comparison operators
You can compare two values with the following operators. When two values are compared by using
these operators, the result is a logical value either TRUE or FALSE.
Comparison operator
Meaning
Example
= (equal sign)
Equal to
A1=B1
Greater than
A1>B1
Less than
A1<B1
A1<=B1
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 4 of 27
Comparison operator
Meaning
Example
Not equal to
A1<>B1
Because the equal sign (=) is used to indicate a formula when you type text or a value in a cell, Excel
evaluates what you type; however, this may cause unexpected filter results. To indicate an equality
comparison operator for either text or a value, type the criteria as a string expression in the appropriate
cell in the criteria range:
=''= entry ''
Where entryis the text or value you want to find. For example:
What you type in the cell What Excel evaluates and displays
="=Davolio"
=Davolio
="=3000"
=3000
Considering case-sensitivity
When filtering text data, Excel does not distinguish between uppercase and lowercase characters.
However, you can use a formula to perform a case-sensitive search. For an example, see Wildcard
criteria.
Using pre-defined names
You can use a calculated value that is the result of a formula as your criterion. Remember the following
important points:
Because you are using a formula, enter the formula as you normally would, and do not type the
expression in the following way:
=''= entry ''
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 5 of 27
Do not use a column label for criteria labels; either keep the criteria labels blank or use a label
that is not a column label in the list range (in the examples below, Calculated Average and Exact
Match).
If you use a column label in the formula instead of a relative cell reference or a range name,
Excel displays an error value such as #NAME? or #VALUE! in the cell that contains the criterion.
You can ignore this error because it does not affect how the list range is filtered.
The formula that you use for criteria must use a relative reference to refer to the corresponding
cell in the first row of data. In the example, A value in a column greater than the average of all
values in that column (formula), you would use C7, and in the example, Text that matches a casesensitive search (formula), you would use A7). Then, the formula is evaluated for each row of
data in the list range.
Top of Page
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
Press CTRL+C.
d.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
e.
Page 6 of 27
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
2
A
Type
Salesperson Sales
Type
Salesperson Sales
5
Beverages Suyama
$5122
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
10
1.
To find rows that meet multiple criteria for one column, type the criteria directly below each
other in separate rows of the criteria range. In the example, you would enter:
1 Type Salesperson
="=Davolio"
="=Buchanan"
1.
Sales
Click a cell in the list range. In the example, you would click any cell in the range, A6:C10.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
2.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
3.
Page 7 of 27
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
4.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $A$1:$C$3.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range,
click Collapse Dialog
1.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
8 Meat
Davolio
$450
9 produce Buchanan
$6,328
10 Produce Davolio
$6,544
Top of Page
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 8 of 27
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
Press CTRL+C.
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
Type
Salesperson Sales
Type
Salesperson Sales
Beverages Suyama
$5122
Meat
$450
Davolio
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 9 of 27
produce
Buchanan
$6328
Produce
Davolio
$6544
10
1.
To find rows that meet multiple criteria in multiple columns, type all of the criteria in the same
row of the criteria range. In the example, you would enter:
1 Type
Salesperson Sales
2 ="=Produce"
>1000
1.
Click a cell in the list range. In the example, you would click any cell in the range, A6:C10.
2.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
3.
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
4.
Page 10 of 27
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $A$1:$C$2.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria
range, click Collapse Dialog
5.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
9 produce Buchanan
$6,328
10 Produce Davolio
$6,544
Top of Page
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
Press CTRL+C.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 11 of 27
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
2
A
Type
Salesperson Sales
Type
Salesperson Sales
5
Beverages Suyama
$5122
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
10
1.
To find rows that meet multiple criteria in multiple columns, where any criteria can be true, type
the criteria in the different columns and rows of the criteria range. In the example, you would
enter:
1 Type
Salesperson
Sales
2 ="=Produce"
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
="=Buchanan"
Page 12 of 27
1.
Click a cell in the list range. In the example, you would click any cell in the list range, A6:C10.
2.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
3.
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
4.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $A$1:$B$3.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria
range, click Collapse Dialog
5.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
9 produce Buchanan
$6,328
10 Produce Davolio
$6,544
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 13 of 27
Top of Page
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
Press CTRL+C.
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
1
A
Type
Salesperson Sales
Type
Salesperson Sales
4
Beverages Suyama
$5122
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 14 of 27
6
A
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
10
1.
To find rows that meet multiple sets of criteria, where each set includes criteria for one column,
include multiple columns with the same column heading. In the example, you would enter:
>6000 <6500
<500
1.
Click a cell in the list range. In the example, you would click any cell in the list range, A6:C10.
2.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
3.
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 15 of 27
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
4.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $A$1:$D$3.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range,
click Collapse Dialog
1.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
8 Meat
Davolio
9 produce Buchanan
$450
$6,328
Top of Page
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 16 of 27
Press CTRL+C.
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
2
A
Type
Salesperson Sales
Type
Salesperson Sales
5
Beverages Suyama
$5122
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
10
1.
To find rows that meet multiple sets of criteria, where each set includes criteria for multiple
columns, type each set of criteria in separate columns and rows. In the example, you would
enter:
1 Type Salesperson
Sales
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
="=Davolio"
>3000
="=Buchanan" >1500
Page 17 of 27
1.
Click a cell in the list range. In the example, you would click any cell in the list range, A6:C10.
2.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
3.
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
4.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $A$1:$C$3.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range,
click Collapse Dialog
1.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
9 produce Buchanan
$6,328
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
10 Produce Davolio
Page 18 of 27
$6,544
Top of Page
Wildcard criteria
Boolean logic:Salesperson
= a name with 'u' as the second letter
logic:
To find text values that share some characters but not others, do one or more of the following:
Type one or more characters without an equal sign (=) to find rows with a text value in a column
that begin with those characters. For example, if you type the text Dav as a criterion, Excel finds
"Davolio," "David," and "Davis."
Use
To find
? (question mark)
* (asterisk)
~ (tilde) followed by ?, *, or ~
1.
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 19 of 27
Press CTRL+C.
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
2
A
Type
Salesperson Sales
Type
Salesperson Sales
5
Beverages Suyama
$5122
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
10
1.
In the rows below the column labels, type the criteria that you want to match. In the example,
you would enter:
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
1 Type
Salesperson Sales
Page 20 of 27
2 ="=Me*"
="=?u*"
1.
Click a cell in the list range. In the example, you would click any cell in the list range, A6:C10.
2.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
3.
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
4.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $A$1:$B$3.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria
range, click Collapse Dialog
5.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 21 of 27
7 Beverages Suyama
$5,122
8 Meat
Davolio
$450
9 produce
Buchanan
$6,328
Top of Page
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
a.
b.
Press CTRL+C.
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 22 of 27
2
A
Type
Salesperson Sales
Type
Salesperson Sales
5
Beverages Suyama
$5122
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
10
1.
In the rows below the column labels, type the criteria that you want to match as a formula by
using the EXACT function to perform a case-sensitive search. Because you are looking for an
exact match in the Type column, which is in column A, you would enter A7 as the first argument.
In the example, you would enter:
=EXACT(A7, "Produce")
1.
Then, the formula is evaluated for each row of data in the list range.
2.
Click a cell in the list range. In the example, you would click any cell in the list range, A6:C10.
3.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
4.
Page 23 of 27
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
5.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $D$1:$D$2.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range,
click Collapse Dialog
1.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
10 Produce Davolio
$6,544
Top of Page
Insert at least three blank rows above the list range that can be used as a criteria range. The
criteria range must have column labels. Make sure that there is at least one blank row between
the criteria values and the list range.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 24 of 27
b.
Press CTRL+C.
d.
e.
To switch between viewing the results and viewing the formulas that return the results,
press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click
the Show Formulas button.
1
A
Type
Salesperson Sales
Type
Salesperson Sales
4
Beverages Suyama
$5122
Meat
Davolio
$450
produce
Buchanan
$6328
Produce
Davolio
$6544
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 25 of 27
10
1.
In the rows below the column labels, type the criteria that you want to match as a formula that
finds a value in the Sales column greater than the average of all the Sales values. Because you
are comparing the formula to values in the Sales column, which is in column C, you would enter
C7 as the first argument. In the example, you would enter:
=C7>AVERAGE($C$7:$C$10)
1.
Then, the formula is evaluated for each row of data in the list range.
2.
Click a cell in the list range. In the example, you would click any cell in the list range, A6:C10.
3.
On the Data tab, in the Sort & Filter group, click Advanced.
Advanced
4.
To filter the list range by hiding rows that don't match your criteria, click Filter the list, ininplace.
place
To filter the list range by copying rows that match your criteria to another area of the
worksheet, click Copy to another location,
location click in the Copy to box, and then click the
upper-left corner of the area where you want to paste the rows.
Tip When you copy filtered rows to another location, you can specify which columns to
include in the copy operation. Before filtering, copy the column labels for the columns
that you want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The copied
rows will then include only the columns for which you copied the labels.
5.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In
the example, you would enter $D$1:$D$2.
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 26 of 27
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria
range, click Collapse Dialog
6.
In the example, the filtered result for the list range would be:
6 Type
Salesperson Sales
7 Beverages Suyama
$5,122
9 produce
Buchanan
$6,328
10 Produce
Davolio
$6,544
Top of Page
To protect your privacy, please do not include contact information in your feedback. Review
our privacy policy.
Send
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14
Page 27 of 27
http://support.office.microsoft.com/client/Filter-by-using-advanced-criteria-4c9222fe-852...
13-Dec-14