Sub topic 5
Turn on AutoFilter
This chapter assumes you can select ranges, enter data, and tell a column header from a worksheet range. It also assumes your data is already laid out with one header row, no blank rows or columns, and consistent types in each column. AutoFilter relies on that layout.
What AutoFilter does
AutoFilter adds a drop-down arrow to each header cell. You use the arrows to hide rows that do not match a condition. Filtering does not delete or move anything. The hidden rows stay in the sheet, and the row numbers on the left skip over them.
Sorting reorders rows. Filtering only changes which rows you see. The two work together, and the same drop-down menu offers both.
Turn it on
- Click any single cell inside your data. Do not select the whole range by hand. Excel finds the contiguous block around the active cell.
- On the Data tab, click Filter. The shortcut is Ctrl+Shift+L.
- Look for the arrow buttons in the header row.
If you do select a range yourself, Excel filters only that selection. Selecting a single cell is safer.
Read the drop-down menu
Click an arrow to open the menu for that column. It contains:
- Sort commands at the top.
- Filter by Color and a type-specific submenu such as Text Filters, Number Filters, or Date Filters.
- A search box.
- A checklist of every distinct value in the column.
Excel chooses the submenu from the data. If a column mixes text and numbers, Excel usually offers Text Filters, which is a clue that some numbers are stored as text.
A worked example
Suppose A1:D8 holds this data:
| Order | Region | Rep | Amount |
|---|---|---|---|
| 1001 | West | Kim | 450 |
| 1002 | East | Lee | 1200 |
| 1003 | West | Ona | 800 |
| 1004 | North | Kim | 300 |
| 1005 | West | Lee | 1500 |
| 1006 | East | Ona | 650 |
| 1007 | North | Kim | 900 |
To see only West orders:
- Click cell B3, then press Ctrl+Shift+L.
- Open the arrow on Region.
- Click (Select All) to clear every check mark.
- Check West and click OK.
Rows 1001, 1003, and 1005 remain. The other row numbers turn blue and disappear from the sequence. A funnel icon replaces the arrow on Region, which tells you that column is filtered. The status bar reads "3 of 7 records found."
To remove the filter from one column, open its arrow and choose Clear Filter From "Region". To turn AutoFilter off completely, press Ctrl+Shift+L again.
Quick checks
- Arrows missing from some columns: a blank header cell or a blank column split the range. Fix the layout and reapply the filter.
- Filter ignores rows at the bottom: new rows were added below a blank row, or outside the original range. Clear the filter and turn it on again.
- Values appear in the checklist twice, such as "West" and "West ": trailing spaces make them distinct. Clean the text before filtering.
Exercise
You select cells A1:A20 only, with data in columns A to D, and press Ctrl+Shift+L. What is the risk, and what should you do instead?
Show answer
Excel applies the filter only to the selected cells, so the other columns may not be treated as part of the filtered list and rows can fall out of alignment when you later sort or filter. Click one cell inside the data, then turn on the filter so Excel detects the whole contiguous block.
Exercise
After you filter the Region column to West, how can you tell at a glance that a filter is active, and how do you see how many rows match?
Show answer
The Region arrow changes to a funnel icon and the row numbers turn blue with gaps. The status bar shows how many records were found out of the total.