The Basic Excel Filter (Excel AutoFilter)

Related Page:
Excel Advanced Filter

The basic Excel filter (also known as the Excel Autofilter) allows you to view specific rows in an Excel spreadsheet, while hiding the other rows in the worksheet.

When a filter is added to the header row of a spreadsheet, a drop-down menu appears on each cell of the header row. This can be used to specify which rows are to be displayed.

Before activating the Excel Filter, it is best to headings of the columns that you want to add the filter to.

If you don't select the columns headings, Excel will attempt to 'guess' which cells are the headers - and will usually guess this correctly. However, there may be occasions when you need to specify the column headings, by highlighting the cells in the header row before applying the filter.


The Excel Autofilter menu is slightly different in Excel 2003, compared to Excel 2007 or Excel 2010. Therefore Excel 2003 and Excel 2007/2010 are addressed separately below:

Go to Excel 2003 Autofilter
Go to Excel 2007/2010 Autofilter

Excel 2003 Basic Filter

Activating the Basic Excel Filter

Autofilter Menu in Excel 2003

In order to activate the basic Excel filter, select the Data menu at the top of your spreadsheet, and from this, select the option Filter and then the option AutoFilter.

You should now have the drop-down menus on each of your header cells, which can be used to select the rows to be displayed.


Autofilter Display in Excel 2003

The example spreadsheet on the right shows sales figures for different sales people, over 3 months. The basic Excel filter has been applied to the header rows of the three columns and the drop-down menu for the 'Sales' column is displayed.

It is seen, that the drop-down menu offers numerous filtering options. These are:

  • (All) - show all rows
  • (Top 10...) - Display rows containing the top N values
  • (Custom...) - Display rows satisfying a supplied condition
  • Value Selection - Display rows having the selected value
  • (Blanks) - Display all blank cells
  • (NonBlanks) - Display all non-blank cells

Once selected, the (Top 10...) and the (Custom...) options are the same in Excel 2003, Excel 2007 and Excel 2010. These options are described in the following 2 sections.


(Top 10...)

Autofilter Top10 Option

The (Top 10...) option is only available for columns that Excel identifies as containing numeric values. This Excel filter option allows you to display only the N highest or the N lowest values from the current column. If you click on this option, Excel brings up an options box, as shown on the right. This contains 3 options:

  1. Select the Top (highest) values or the Bottom (lowest) values
  2. Option to select the number, N
  3. Select Items or N Percent of entries to be displayed

(Custom...)

Autofilter Custom Option

The (Custom...) option allows you to define a condition, which if satisfied by a cell, will result in the corresponding row being displayed. This option contains numeric and text specific conditions. However, some of the options are only suited to text data and some are only suitable for numeric data.

If your column contains numerical values (including dates), you can use the criteria 'equals', 'does not equal', 'is greater than', 'is greater than or equal to', 'is less than' or 'is less than or equal to'.

If your column contains text values, you can use the criteria 'equals', 'does not equal', 'begins with', 'does not begin with', 'ends with', 'does not end with', 'contains' or 'does not contain'

Up to 2 criteria can be combined, separated by an 'and' or an 'or'.


Removing the Excel Filter

To remove the basic Excel filter, simply select the Data menu at the top of your spreadsheet, and from this, select the option Filter and then the option AutoFilter. Unticking the AutoFilter option removes the filter.


Excel 2007 / 2010 Basic Filter

Activating the Basic Excel Filter

Autofilter Selection in Excel 2007 and Excel 2010

In order to activate the basic Excel filter, select the Data tab at the top of your spreadsheet, and from this, select the option Filter.

You should now have the drop-down menus on each of your header cells, which can be used to select the rows to be displayed.


Autofilter Display in Excel 2007 and Excel 2010

The example spreadsheet on the right shows sales figures for different sales people, over 3 months. The basic Excel filter has been applied to the header rows of the three columns and the drop-down menu for the 'Sales' column is displayed.

It is seen, that the drop-down menu offers a simple filter on the contents of the cells in the filtered column. These are:

The user can untick the values in rows that (s)he does not wish to display.

A new feature of Excel 2007/2010 (compared to Excel 2003) is the ability to filter by colour. This may be text colour or the colour of a cell background.

Also in the above image, is the option to apply number filters. Excel has displayed this option because the data in the filtered column is numeric (note that for columns containing text data, Excel offers text-specific filters instead, such as 'Begins With', 'Ends With', 'Contains', etc)

The Excel filters in the Number Filters... category are:

  • Numerical Conditions - open up a box to define simple numerical condition and then display cells satisfying the condition
  • (Top 10...) - Display rows containing the top N values
  • (Above Average) - Display numerical values that are above the average value
  • (Below Average) - Display numerical values that are below the average value
  • (Custom Filter...) - Display rows satisfying one or more user-defined conditions

Further explanation of the (Top 10) and the (Custom) options are given below.


(Top 10...)

Autofilter Top10 Option

The (Top 10...) option is only available for columns that Excel identifies as containing numeric values.

This Excel filter option allows you to display only the N highest or the N lowest values from the current column. If you click on this option, Excel brings up an options box, as shown on the right. This contains 3 options:

  1. Select the Top (highest) values or the Bottom (lowest) values
  2. Option to select the number, N
  3. Select Items or N Percent of entries to be displayed


(Custom...)

Autofilter Custom Option

The (Custom...) option allows you to define a condition, which if satisfied by a cell, will result in the corresponding row being displayed. This option contains numeric and text specific conditions. However, some of the options are only suited to text data and some are only suitable for numeric data.

If your column contains numerical values (including dates), you can use the criteria 'equals', 'does not equal', 'is greater than', 'is greater than or equal to', 'is less than' or 'is less than or equal to'.

If your column contains text values, you can use the criteria 'equals', 'does not equal', 'begins with', 'does not begin with', 'ends with', 'does not end with', 'contains' or 'does not contain'

Up to 2 criteria can be combined, separated by an 'and' or an 'or'.


Removing the Excel Filter

To remove the filter from an Excel 2007 or Excel 2010 spreadsheet, simply select the Data tab at the top of your spreadsheet, and from within this, click on the Filter option.


Common Problems with the Excel Autofilter

Two commonly encountered problems with the Excel Autofilter are:

The Filter Stops Working Part of the Way Down the Spreadsheet
The 'Custom' Filter Fails to Show Rows that Satisfy the Specified Condition

These are dealt with separately below:

Common Problem No. 1: Filter Stops Working Part Way Down the Spreadsheet

If your Excel Autofilter works for the top part of the data in your spreadsheet, but stops working part way down, this is probably because you have added more data, since initially activating the Filter.

Solution

In this case, remove the autofilter and then activate it again. This causes the new data to be added to the range of filtered cells.


Common Problem No. 2: The 'Custom' Filter Fails to Display Rows That Satisfy the Specified Condition

If you use the (Custom...) option and the condition that you specify fails to work, this may be because you are using a text condition (ie. 'begins with', 'does not begin with', 'ends with', 'does not end with', 'contains' or 'does not contain') on numerical values, OR because you are using a numerical condition (ie. 'is greater than', 'is greater than or equal to', 'is less than' or 'is less than or equal to') on text values.

Solution

In this case, you can get the filter to work as expected by changing the column data to the type that relates to the condition you wish to apply. For example, to get the 'begins with' condition to work on a column of numbers, you will need to convert the numbers to text before applying the Custom filter. One way to do this is using Excel's Text To Columns tool:

  1. Use the mouse to select the cells you want to convert to text (this must not span more than one column)
  2. From the Data tab at the top of your Excel workbook, select the Text to Columns ... option
  3. Click next and then next again
  4. You should now be offered a selection of Column Data Formats. Select Text and click the Finish button

The data in your selected cells should now be stored as text within Excel.

Similarly, you could have chosen to convert text values (consisting of numbers) to numerical values, by simply selecting the column data format General within the Text To Columns tool.


For more information on the Excel filtering, visit the Microsoft Office website.

Return to the Basic Excel Page

Return to the ExcelFunctions.net Home Page

Valid XHTML 1.0 Transitional Valid CSS!
Disclaimer   Privacy Policy
Copyright © 2008-2014 ExcelFunctions.net