Blog
How to Filter Data in Excel: AutoFilter and Advanced Filter
To filter data in Excel, click any cell in your list, go to Data > Filter (or press Ctrl+Shift+L), then use the arrow in a column header to pick the values or conditions you want. Excel hides every row that doesn't match and leaves the data itself untouched. That covers simple questions. Real ones, like "missing assignments from the last two weeks, for Period 2 or for the two students the counselor asked about," mix AND with OR across columns, and that is where AutoFilter stops and Advanced Filter or the FILTER function takes over. Below is each method, when to use it, and the mistakes that make a filter quietly return the wrong rows.
Method 1: AutoFilter
Microsoft's guide to filtering data in a range or table describes the basic flow: select a cell inside the data, choose Data > Filter, and a drop-down arrow appears on every header. Pressing Ctrl+Shift+L again turns filtering off.
If you format the list as a table first (Ctrl+T), filter arrows are added automatically, and the table grows as you add rows. For a gradebook export that gets new lines every week, a table is the better starting point because new rows are always inside the filter range.
Pick values from the list
Click a header arrow, clear (Select All), check the values you want and click OK. The search box above the list narrows long lists as you type. To find rows with an empty cell, such as assignments with no score entered yet, scroll to the bottom of the list and check (Blanks).
The value list shows only the first 10,000 unique entries. For columns with more distinct values, like student ID numbers or email addresses, use a condition instead of scrolling the list.
Number, text and date filters
The menu adapts to the column's data type. A score column offers Number Filters with Equals, Greater Than, Between, Top 10 and Above Average. A student name column offers Text Filters with Contains, Begins With and Does Not Equal. A date column offers Date Filters with ready-made periods like This Week, Next Month or Last Quarter.
Inside the custom filter dialog you can join two conditions with And or Or, but only within that one column. Microsoft also warns against mixing data types in a column: Excel shows the filter menu for whichever type is most common. If more than half of a score column is stored as text, you get Text Filters and can't ask for "less than 70."
Several columns means AND
Filters stack. Pick "Mid-Atlantic" in Region and "Greater than or equal to 10,000" in Revenue, and only rows that meet both remain. Between columns, AutoFilter is always AND. "Region is Mid-Atlantic OR revenue is at least $20,000" can't be built with header arrows.
Method 2: Advanced Filter for OR logic and extracts
Advanced Filter reads its conditions from a small criteria range on the sheet. According to Microsoft's article on filtering with advanced criteria, the one rule to remember is: conditions on the same row are AND, conditions on different rows are OR.
Build the criteria range
- Leave a few empty rows above the data. Keep at least one blank row between the criteria range and the list.
- Copy the exact column headers into the top row of the criteria range. A header with a trailing space won't match, and the condition is silently ignored.
- Type the conditions under the headers. Numbers take operators such as
>=10000; text is typed as is. - Select a cell in the list and choose Data > Advanced (in the Sort & Filter group).
- Set List range to the whole list and Criteria range to the criteria cells, headers included.
- Choose Filter the list, in-place to hide rows, or Copy to another location and pick a destination in Copy to.

The criteria above sit on one row, so Excel keeps rows where Region is Mid-Atlantic AND revenue is at least 10,000. The result is three rows:

Move the conditions onto separate rows and the logic flips to OR: Region is West Coast on the first row, revenue of at least 20,000 on the second.

Two Advanced Filter traps
Text criteria match the beginning of a value. Typing Lee in the criteria returns "Lee, Jordan," but also "Lee, Sam" and "Leeds, Ava." For an exact match, enter ="=Lee, Jordan". The cell displays =Lee, Jordan, which Excel reads as an equals condition.
The result does not refresh. If you change a criterion or the data changes, nothing updates until you run Data > Advanced again. For a weekly pull where only the conditions change, the FILTER function is easier.
Method 3: The FILTER function
In Microsoft 365, Excel 2024 and Excel 2021, the FILTER function returns matching rows with one formula: =FILTER(array, include, [if_empty]). Multiply conditions for AND, add them for OR:
=FILTER(A2:H2001, (D2:D2001="Missing") * (F2:F2001>=TODAY()-14) * ((C2:C2001="Period 2") + (B2:B2001="Lee, Jordan") + (B2:B2001="Ortiz, Maya")), "None")
The results spill down from the formula cell and recalculate as soon as the source data changes. Supply the third argument; without it, an empty result shows #CALC!. Keep the cells below and to the right of the formula empty, or you get #SPILL!. Excel 2019 and earlier don't have FILTER, so a colleague on an older version who opens the file sees errors instead of rows.
| Method | Logic it handles | Where results go | When data or criteria change | Versions |
|---|---|---|---|---|
| AutoFilter | AND across columns, OR inside one column | Hides rows in place | Click Reapply | All |
| Advanced Filter | Any mix of AND and OR | In place or another location | Run Advanced again | All desktop versions |
| FILTER function | AND (multiply), OR (add) | Spills from the formula cell | Updates instantly | Microsoft 365, 2021, 2024 |
Worked example: Friday's missing-work list
A high school history teacher starts each Monday with Assignments_Fall.xlsx, an export from her gradebook of about 2,000 assignment lines with Assignment, Student, Period, Status, Category, Due Date, Points and Score. For Friday's lunch catch-up session she needs one list: lines that are missing, due in the last 14 days, and either in Period 2, where a week of flu absences left half the class behind, or for Jordan Lee or Maya Ortiz, two students in other periods whose counselor asked her to include them.

Step 1: check the data. The Due Date arrow showed Text Filters instead of Date Filters, a sign that some dates came out of the gradebook as text. Selecting the column and running Data > Text to Columns > Finish converted them to real dates. In the Student list, "Lee, Jordan" appeared twice, once with a trailing space; Find and Replace fixed that.
Step 2: build the criteria. Above the data, she pasted the Student, Period, Status and Due Date headers and filled three rows. Row one: Period Period 2, Status Missing, Due Date >= the date two weeks back. Row two: Student ="=Lee, Jordan" plus the same Status and Due Date conditions. Row three: the same for Maya Ortiz. The OR is only on the period and the two students, so Status and Due Date are repeated on every row. Forgetting them on one row is the most common mistake: that row then pulls every assignment Maya has had this semester, turned in or not.
Step 3: copy to a new sheet. Advanced Filter can only copy results to the active sheet, so she opened a new sheet named Catch-Up, selected A1 there, ran Data > Advanced, and pointed the list range back at the assignment sheet. The result: 64 lines.
Step 4: check the count. A quick AutoFilter on the original, run once for Period 2 and once for each student and added up, gave the same 64. The list went to the printer sorted by student name.
👉 How to Sort in Excel: Multiple Columns, Custom Order, Fixes
Why your Excel filter isn't working
There is a blank row in the data. Excel treats it as the end of the list, so rows below it are left out. Select the full range before turning on the filter, or convert the list to a table.
The header row is merged or split over two lines. Filter arrows land on the wrong row. Use a single header row with no merged cells.
Numbers or dates are stored as text. Left-aligned numbers or green triangles in the corner give it away. Those values fall out of number and date filters. Convert them with Text to Columns, VALUE or DATEVALUE.
New rows don't show up. A filter reflects the data at the moment it was applied. After adding or editing rows, click Data > Reapply.
You can't filter two lists on one sheet. Only one range per sheet can carry an AutoFilter. Turn each list into a table; every table has its own filter.
To clear everything, use Data > Clear; to remove the arrows too, click Filter again. To clear one column, open its arrow and choose Clear Filter From "Column". Note that Find (Ctrl+F) searches only the visible rows while a filter is on.
Differences between Excel versions
The Windows versions of Microsoft 365, Excel 2024, 2021 and 2019 use the same menus. Excel for Mac has the same Data > Filter and Advanced commands, but the filter opens in its own panel; if Auto Apply is off, click Apply Filter to see the result. Excel for the web supports AutoFilter and the FILTER function but not Advanced Filter, so open the workbook in the desktop app when you need a criteria range.
FAQ
Q. How do I copy only the filtered rows?
In desktop Excel, select the range, go to Home > Find & Select > Go To Special > Visible cells only, then copy. The shortcut is Alt+;. Microsoft's article on copying visible cells only notes that Excel for the web has no such option: copying a plain range brings hidden rows along, while a filtered table copies only the visible rows.
Q. Why doesn't SUM match the filtered rows?
SUM includes hidden rows. Use =SUBTOTAL(109, H2:H2001) or AGGREGATE to add only what is visible. The sum in the status bar already counts visible cells only.
Q. Can I edit values while a filter is on?
Yes. An edited row that no longer matches stays visible until you click Reapply. To fill many visible rows at once, select visible cells only, type the value and press Ctrl+Enter.
Q. A value I expect is missing from the filter list. Why?
Either a blank row cut the range short, or the column has more than 10,000 unique values and the list is truncated. Fix the range in the first case; use Text Filters > Contains in the second.
Pull a missing-work list with inline AI
With the gradebook export open, tell inline AI what you need in plain words, such as "missing, due in the last two weeks, Period 2 or Jordan and Maya, copied to a Catch-Up sheet." inline AI cleans up text dates and stray spaces first, pulls the matching lines, and reports the count so you can check it before you print.
Gradebooks and spreadsheets, finished by inline AI in the file itself.
Ask in one sentence for roll-ups, trackers and the cleanup you repeat every week. Your files never leave your computer.




