Beruflich Dokumente
Kultur Dokumente
Using AutoFilter to filter data is a quick and easy way to find and work with a subset of data in a range of cells or table
column.
2. Filter text
3. Filter numbers
9. Filter by selection
Filtered data displays only the rows that meet criteria (criteria: Conditions you specify to limit which records are
included in the result set of a query or filter.) that you specify and hides rows that you do not want displayed. After
you filter data, you can copy, find, edit, format, chart, and print the subset of filtered data without rearranging or
moving it.
You can also filter by more than one column. Filters are additive, which means that each additional filter is based on
Using AutoFilter, you can create three types of filters: by a list values, by a format, or by criteria. Each of these filter
types is mutually exclusive for each range of cells or column table. For example, you can filter by cell color or by a list
of numbers, but not by both; you can filter by icon or by a custom filter, but not by both.
IMPORTANT For best results, do not mix storage formats, such as text and number or number and date, in the same
column because only one type of filter command is available for each column. If there is a mix of storage formats, the
command that is displayed is the storage format that occurs the most. For example, if the column contains three
values stored as number and four as text, the filter command that is displayed is Text Filters. For more information,
see Convert numbers stored as text to numbers and Convert dates stored as text to dates.
Filter text
Range of cells
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Filter.
Table
Make sure that the active cell is in a table column that contains alphanumeric data.
In the list of text values, select or clear one or more text values to filter by.
The list of text values can be up to 10,000. If the list is large, clear (Select All) at the top, and then
TIP To make the AutoFilter menu wider or longer, click and drag the grip handle at the bottom.
Create criteria
1. Point to Text Filters and then click one of the comparison operator (comparison operator: A sign that
is used in comparison criteria to compare two values. Operators include: = Equal to, > Greater than, <
Less than, >= Greater than or equal to, <= Less than or equal to, and <> Not equal to.) commands, or
For example, to filter by text that begins with a specific character, select Begins With, or to filter by
text that has specific characters anywhere in the text, select Contains.
2. In the Custom AutoFilter dialog box, in the box on the right, enter text or select the text value from
the list.
For example, to filter by text that begins with the letter "J", enter J, or to filter by text that has "bell"
If you need to find text that shares some characters but not others, use a wildcard character.
The following wildcard characters can be used as comparison criteria for text filters.
Use To find
To filter the table column or selection so that both criteria must be true, select And.
To filter the table column or selection so that either or both criteria can be true, select Or.
2. In the second entry, select a comparison operator, and then in the box on the right, enter text or
Filter numbers
Range of cells
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Filter.
Table
Make sure that the active cell is in a table column that contains numeric data.
In the list of numbers, select or clear one or more numbers to filter by.
The list of numbers can be up to 10,000. If the list is large, clear (Select All) at the top, and then
TIP To make the AutoFilter menu wider or longer, click and drag the grip handle at the bottom.
Create criteria
1. Point to Number Filters and then click one of the comparison operator (comparison operator: A sign
that is used in comparison criteria to compare two values. Operators include: = Equal to, > Greater
than, < Less than, >= Greater than or equal to, <= Less than or equal to, and <> Not equal to.)
For example, to filter by a lower and upper number limit, select Between.
2. In the Custom AutoFilter dialog box, in the box or boxes on the right, enter numbers or select
For example, to filter by a lower number of 25 and an upper number of 50, enter 25 and 50.
To filter the table column or selection so that both criteria must be true, select And.
To filter the table column or selection so that either or both criteria can be true, select Or.
2. In the second entry, select a comparison operator, and then in the box on the right, enter a
Range of cells
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Filter.
Table
Make sure that the active cell is in a table column that contains dates or times.
In the list of dates or times, select or clear one or more dates or times to filter by.
By default, all dates in the range of cells or table column are grouped by a hierarchy of years, months,
and days. Selecting or clearing a higher level in the hierarchy selects or clears all nested dates below
that level. For example, if you select 2006, months are listed below 2006, and days are listed below
each month.
The list of values can be up to 10,000. If the list of values is large, clear (Select All) at the top, and
TIP To make the AutoFilter menu wider or longer, click and drag the grip handle at the bottom.
Create criteria
Common filter
NOTE A common filter is one based on a comparison operator (comparison operator: A sign that is
used in comparison criteria to compare two values. Operators include: = Equal to, > Greater than, <
Less than, >= Greater than or equal to, <= Less than or equal to, and <> Not equal to.).
1. Click one of the comparison operator commands (Equals, Before, After, or Between) or click
Custom Filter.
2. In the Custom AutoFilter dialog box, in the box on the right, enter a date or time, select a date
or time from the list, or click the Calendar button to find and enter a date.
For example, to filter by a lower and upper date or time, select Between.
3. In the Custom AutoFilter dialog box, in the box or boxes on the right, enter a date or time,
select dates or times from the list, or click the Calendar button to find and enter a date.
For example, to filter by an earlier date of "3/1/2006" and a later date of "6/1/2006", enter
3/1/2006 and 6/1/2006. Or, to filter by an earlier time of "8:00 AM" and a later time of "12:00
Dynamic filter
NOTE A dynamic filter is one where the criteria can change when you reapply the filter.
For example, to filter all dates by the current date, select Today, or by the following month,
5. Click OK.
NOTES
The commands under the All Dates in the Period menu, such as January or Quarter 2,
filter by the period no matter what the year. This can be useful, for example, to compare
This Year and Year to Date are different in the way that future dates are handled. This
Year can return dates in the future for the current year, whereas Year to Date only
To filter the table column or selection so that both criteria must be true, select And.
To filter the table column or selection so that either or both criteria can be true, select Or.
2. In the second entry, select a comparison operator, and then in the box on the right, enter a date
or time, select a date or time from the list, or click the Calendar button to find and enter a date.
NOTES
Fiscal years and fiscal quarters always start in January of the calendar year.
If you want to filter by days of the week, format the cells to show the day of the week. If you want to filter by
the day of the week regardless of the date, convert them to text by using the TEXT function. However, the
TEXT function returns a text value, and so the filter command that is displayed would be Text Filters, not
Range of cells
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Filter.
Table
Make sure that the active cell is in a table column that contains numeric data.
NOTE Top and bottom values are based on the original range of cells or table column and not the filtered subset of
data.
Range of cells
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Filter.
Table
Make sure that the active cell is in a table column that contains numeric data.
To filter by numbers that are above the average, click Above Average.
To filter by numbers that are below the average, click Below Average.
NOTE Above and below average numbers are based on the original range of cells or table column and not the
Range of cells
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Filter.
Table
To filter for nonblanks, in the AutoFilter menu at the top of the list of values, select (Select All), and
To filter for blanks, in the AutoFilter menu at the top of the list of values, clear (Select All), and then at
NOTE The (Blanks) check box is available only if the range of cells or table column contains at least one
blank cell.
colors. You can also filter by an icon set created through a conditional format.
Range of cells
1. Select a range of cells containing formatted by cell color, font color, or an icon set.
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Filter.
Table
Make sure that the table column contains data formatted by cell color, font color, or an icon set (No
selection is required).
3. Select Filter by Color, and then depending on the type of format, select Filter by Cell Color, Filter by
4. Depending on the type of format, select a color, font color, or cell icon.
Top of Page
Filter by selection
You can quickly filter data with criteria that is equal to the contents of the active cell.
1. In a range of cells or table column, right click a cell containing the value, color, font color, or icon you want
to filter by.
For the list of dates at the bottom of the AutoFilter menu in a date filter, you can change the hierarchical grouping of
dates to a nonhierarchical list of dates. For example, you can filter for just two-digit years by manually selecting them
1. Click the Microsoft Office Button , click Excel Options, and then click the Advanced category.
2. In the Display options for this workbook section, select a workbook, and then clear the Group dates in
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.
Insert at least three blank rows above the 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 range.
Example criteria range and data range for the criteria examples in step 2
A B C
In the rows below the column labels, type the criteria that you want to match.
Criteria examples
Important
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 entry is 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
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 Filtering for
text by using a case-sensitive search.
Multiple sets of criteria where each set includes criteria for multiple columns
Multiple sets of criteria where each set includes criteria for one column
Criteria to find text values that share some characters but not others
Filtering for values greater than the average of all values in the data range
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 following data range (A6:C10), the criteria range (B1:B3) displays the rows that contain either
"Davolio" or "Buchanan" in the Salesperson column (A8:C10).
A B C
2 =Davolio
3 =Buchanan
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 following data range (A6:C10), the criteria range (A1:C2) displays all rows that contain "Produce"
in the Type column and a value greater than $1,000 in the Sales column (A9:C10).
A B C
2 =Produce >1000
To find rows that meet multiple criteria in multiple columns, where any criteria can be true, type the
criteria in different rows of the criteria range.
In the following data range (A6:C10), the criteria range (A1:B3) displays all rows that contain "Produce"
in the Type column or "Davolio" in the Salesperson column (A8:C10).
A B C
2 =Produce
3 =Davolio
4
Multiple sets of criteria where each set includes criteria for multiple columns
Boolean logic: ( (Salesperson = "Davolio" AND Sales >3000) OR (Salesperson = "Buchanan" AND Sales >
1500) )
To find rows that meet multiple sets of criteria, where each set includes criteria for multiple columns,
type each set of criteria in separate rows.
In the following data range (A6:C10), the criteria range (B1:C3) displays the rows that contain both
"Davolio" in the Salesperson column and a value greater than $3,000 in the Sales column, or displays the
rows that contain "Buchanan" in the Salesperson and a value greater than $1,500 in the Sales column
(A9:C10).
A B C
2 =Davolio >3000
3 =Buchanan >1500
Multiple sets of criteria where each set includes criteria for one column
Boolean logic: ( (Sales > 6000 AND Sales < 6500 ) OR (Sales < 500) )
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 following data range (A6:C10), the criteria range (C1:D3) displays rows that contain values
between 5,000 and 8,000 and values less than 500 in the Sales column (A8:C10).
A B C D
2 >6000 <6500
3 <500
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
In the following data range (A6:C10), the criteria range (A1:B3) displays rows with "Me" as the first
characters in the Type column or rows with the second character equal to "u" in the Salesperson column
(A7:C9).
A B C
2 Me
3 =?u*
5
6 Type Salesperson Sales
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell
references, names, functions, or operators in a cell that together produce a new value. A formula always
begins with an equal sign (=).) 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''
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 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 range is filtered.
The formula that you use for criteria must use a relative reference (relative reference: In a formula, the
address of a cell based on the relative position of the cell that contains the formula and the cell referred
to. If you copy the formula, the reference automatically adjusts. A relative reference takes the form A1.)
to refer to the corresponding cell in the first row (in the examples below, C7 and A7).
All other references in the formula must be absolute references (absolute cell reference: In a formula,
the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute
cell reference takes the form $A$1.).
The following subsections provide specific examples of criteria created as the result of a formula.
Filtering for values greater than the average of all values in the data range
In the following data range (A6:D10), the criteria range (D1:D2) displays rows that have a value in the
Sales column greater than the average of all the Sales values (C7:C10). In the formula, "C7" refers to the
filtered column (C) of the first row of the data range (7).
A B C D
2 =C7>AVERAGE($C$7:$C$10)
In the data range (A6:D10), the criteria range (D1:D2) displays rows that contain "Produce" in the Type
column by using the EXACT function to perform a case-sensitive search (A10:C10). In the formula, "A7"
refers to the filtered column (A) of the first row of the data range (7).
A B C D
2 =EXACT(A7, "Produce")
On the Data tab, in the Sort & Filter group, click Advanced.
To filter the range by hiding rows that don't match your criteria, click Filter the list, in-place.
To filter the range by copying rows that match your criteria to another area of the worksheet, click Copy
to another location, click in the Copy to box, and then click the upper-left corner of the area where you
want to paste the rows.
In the Criteria range box, enter the reference for the criteria range, including the criteria labels.
To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range,
click Collapse Dialog .
To change how the data is filtered, change the values in the criteria range and filter the data again.
Notes
You can name a range Criteria, and the reference for the range will appear automatically in the Criteria
range box. You can also define the name Database for the range of data to be filtered and define the
name Extract for the area where you want to paste the rows, and these ranges will appear automatically
in the List range and Copy to boxes, respectively.
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.