How to Create a Filter in Excel: Complete Step-by-Step Guide for AutoFilter, Advanced Filter, and the FILTER Function
Learn how to create a filter in Excel using AutoFilter, Advanced Filter, and the FILTER function. Step-by-step examples, shortcuts, and troubleshooting tips.

Learning how to create a filter in Excel is one of the highest-leverage skills you can build, because filters turn a sprawling dataset into a focused, decision-ready view in seconds. Whether you are reviewing a 10,000-row sales export, cleaning a customer list, or preparing a board report, filtering lets you isolate the exact rows that matter without deleting anything. In this guide we will walk through every major filter type, from the classic AutoFilter dropdowns to the dynamic FILTER function introduced in Microsoft 365.
Excel offers three primary ways to filter data, and choosing the right one depends on your version, the size of your dataset, and whether you need the filter to update automatically. AutoFilter is the click-and-go tool most beginners start with. Advanced Filter unlocks complex multi-criteria logic and lets you copy results to a new location. The FILTER function, available in Excel 365 and Excel 2021, returns a spilled array that recalculates the instant your source data changes.
Filters are not destructive. When you apply a filter, Excel simply hides the rows that do not match your criteria, leaving the underlying data intact. That means you can layer filters, clear them, and re-apply different criteria without ever losing information. This is fundamentally different from sorting, which rearranges rows permanently, or deleting, which removes data outright. Understanding this distinction is critical for anyone who works with shared workbooks or audit trails.
The keyboard shortcut for toggling AutoFilter is Ctrl+Shift+L on Windows and Cmd+Shift+F on Mac, and committing it to muscle memory will save you thousands of mouse clicks over a career. Once filters are on, small dropdown arrows appear in each header cell, giving you instant access to checkbox lists, text filters, number filters, date filters, and color filters. Each of these subtypes behaves slightly differently, and we will explore the most useful variants below.
Filters also interact with other Excel features in ways that surprise new users. Formulas like SUM and COUNT ignore the visibility state of rows by default, but functions like SUBTOTAL and AGGREGATE respect it, returning calculations based only on visible cells. This makes filters a powerful exploratory analysis tool when paired with the right formulas. We will cover these formula interactions, common pitfalls, and the differences between filtering ranges and filtering Excel Tables, which behave noticeably better in nearly every scenario.
By the end of this guide you will know exactly how to create, modify, clear, and troubleshoot filters in any modern version of Excel. You will understand when to reach for AutoFilter versus Advanced Filter versus the FILTER function, how to filter by color, how to filter with wildcards, how to combine multiple criteria with AND and OR logic, and how to avoid the classic mistakes that cause filters to skip rows or fail entirely. We will also touch on related skills like VLOOKUP, dropdown lists, and removing duplicates that pair naturally with filtering in real workflows.
Whether you are an Excel beginner trying to make sense of a messy spreadsheet or an experienced analyst looking to modernize your workflow with dynamic array functions, this guide will give you a complete, practical foundation. Bookmark it, follow along in a blank workbook, and by the time you finish reading you will be filtering with the confidence of someone who has done it ten thousand times.
Excel Filtering by the Numbers

Step-by-Step: Creating Your First Filter
Prepare Your Data
Select Any Cell in the Range
Activate AutoFilter
Click a Header Dropdown
Choose Your Criteria
Review and Clear When Done
The fastest way to turn on filtering in Excel is to click anywhere inside your data and press Ctrl+Shift+L. This single shortcut toggles AutoFilter on and off across the entire detected range, instantly adding dropdown arrows to every header cell. If your data is formatted as an Excel Table (Ctrl+T), filters are enabled by default the moment the table is created, which is one of many reasons experienced users convert ranges to tables before doing any serious analysis.
If you prefer the ribbon, navigate to the Data tab and click the large Filter button in the Sort and Filter group. The button is a funnel icon and toggles the same AutoFilter feature as the keyboard shortcut. You can also reach it from the Home tab by clicking Sort and Filter in the Editing group and choosing Filter from the dropdown menu. All three paths produce identical results, so use whichever feels most natural in your workflow.
Once filters are active, clicking any header arrow opens a dropdown panel divided into three sections. The top contains sort options (A to Z, Z to A, sort by color). The middle offers type-specific filter menus such as Text Filters, Number Filters, or Date Filters. The bottom shows a searchable checkbox list of every unique value in that column. Excel automatically detects the data type of each column and tailors the menu accordingly, which is why mixing text and numbers in one column causes filter menus to behave unpredictably.
To filter by checkbox, simply uncheck Select All and then tick the specific values you want to keep visible. When you click OK, every row whose value in that column is not checked will be hidden. The dropdown arrow on that column changes to a funnel icon, giving you a visual cue that a filter is active. The status bar at the bottom of Excel also displays how many records were found out of the total, which is invaluable for verifying that your filter caught what you expected.
The search box inside the filter dropdown is one of the most underused features in Excel. Instead of scrolling through thousands of entries, type a partial string and Excel narrows the list in real time. You can use wildcards here: an asterisk matches any sequence of characters and a question mark matches a single character. For example, typing *smith* in a name column finds Smithson, Goldsmith, and Smith equally well, while ?ohn finds John, Bohn, and Cohn.
For complex criteria, the Text Filters and Number Filters submenus give you operators like Equals, Does Not Equal, Begins With, Ends With, Contains, Greater Than, Less Than, Between, Top 10, Above Average, and Below Average. Date columns add a rich set of options including Last Week, This Month, Next Quarter, and Year to Date. These dynamic date filters recalculate based on the current system date, which is enormously useful for recurring reports but can also surprise you if you reopen a workbook months later.
You can apply filters to multiple columns simultaneously, and Excel combines them with AND logic by default. Filtering Region to West and Product to Widgets shows only rows that are both Western and Widget-related. Within a single column, checkbox selections behave as OR logic. This combination of OR within a column and AND across columns covers most everyday filtering needs, but for true OR logic across columns or other complex scenarios, you will need Advanced Filter or the FILTER function, which we cover in later sections.
Filter Types: Text, Number, and Date
Text Filters appear automatically when Excel detects a column containing text values. The submenu includes Equals, Does Not Equal, Begins With, Ends With, Contains, Does Not Contain, and Custom Filter. Each option opens a dialog where you can enter the target string and combine two conditions with AND or OR logic for a single column. This is often more flexible than the checkbox list, especially when working with thousands of unique strings.
Wildcards are fully supported in text filters. The asterisk represents any number of characters and the question mark represents exactly one character. For example, filtering a product code column with Begins With SKU-2024-? finds codes like SKU-2024-A and SKU-2024-9 but excludes SKU-2024-AB. Pair wildcards with Contains to build powerful search patterns that would otherwise require formulas, regex add-ins, or Power Query M code.

AutoFilter vs Advanced Filter: Which Should You Use?
- +AutoFilter is faster to set up — just one keyboard shortcut
- +AutoFilter works in-place without writing criteria to other cells
- +AutoFilter supports searchable dropdowns and color filtering
- +AutoFilter integrates seamlessly with Excel Tables
- +AutoFilter is non-destructive and easy to clear
- +AutoFilter respects subsequent SUBTOTAL and AGGREGATE formulas
- +AutoFilter supports dynamic date filters like This Month
- −AutoFilter cannot combine OR logic across multiple columns
- −AutoFilter dropdowns are capped at 10,000 unique items
- −AutoFilter cannot copy filtered results to a new location easily
- −AutoFilter has no built-in support for unique-only results
- −AutoFilter criteria cannot be saved or reused in formulas
- −AutoFilter struggles with mixed text and number columns
- −AutoFilter slows noticeably on datasets above 500,000 rows
Advanced Filter Setup Checklist
- ✓Ensure your source data has a header row that exactly matches your criteria range headers.
- ✓Create a separate criteria range with the same column names you plan to filter on.
- ✓Use one row per AND condition and stack additional rows for OR conditions.
- ✓Leave at least one blank row between the source data and the criteria range.
- ✓Decide whether to filter in place or copy results to a new location before opening the dialog.
- ✓In the Advanced Filter dialog, set the List range to your full source data including headers.
- ✓Set the Criteria range to your criteria block including its header row.
- ✓Check Unique records only if you want to deduplicate filtered output automatically.
- ✓Test with a small criteria change to confirm the output behaves as expected.
- ✓Document the criteria range with a comment so future users understand the logic.
Excel Tables make filtering dramatically more reliable
Press Ctrl+T to convert any clean range into an Excel Table. Tables auto-expand when you add rows, keep filter arrows visible by default, and let you write structured references like Sales[Region] instead of A2:A10000. This single habit eliminates the majority of filter bugs experienced users encounter.
The FILTER function, introduced in Excel 365 and Excel 2021, represents a fundamentally different approach to filtering. Instead of hiding rows in place, FILTER returns a dynamic array of matching rows to a new location. The syntax is straightforward: =FILTER(array, include, [if_empty]). The array is the data you want to filter, include is a boolean condition that evaluates to TRUE or FALSE for each row, and if_empty is an optional value returned when no rows match.
For example, suppose you have sales data in A2:D1000 with regions in column A. To return all rows where the region is West, you would write =FILTER(A2:D1000, A2:A1000="West", "No matches"). The result spills automatically across as many cells as needed, and updates the instant the underlying data changes. This dynamic behavior is what makes FILTER so powerful for dashboards and reports that need to stay current without manual refresh.
Combining multiple conditions in FILTER uses multiplication for AND logic and addition for OR logic. To find rows where the region is West AND sales exceed 1000, write =FILTER(A2:D1000, (A2:A1000="West")*(C2:C1000>1000)). For OR logic, swap the asterisk for a plus sign. The parentheses around each condition are critical because Excel evaluates the entire boolean expression as a single array of 1s and 0s before passing it to FILTER. Forgetting them produces silent errors that are hard to debug.
FILTER pairs beautifully with other dynamic array functions like SORT, UNIQUE, and CHOOSECOLS. To return only the unique customer names from a filtered list, nest UNIQUE around FILTER: =UNIQUE(FILTER(B2:B1000, A2:A1000="West")). To sort the results by sales descending, wrap SORT around the whole thing: =SORT(FILTER(A2:D1000, A2:A1000="West"), 3, -1). This compositional style turns Excel into something closer to a query language than a spreadsheet.
Unlike AutoFilter, FILTER does not hide the original data. The source range remains fully visible, and the FILTER output is a separate computed array. This is ideal when you want side-by-side views or when you want to build downstream formulas that depend on a filtered subset. It is less ideal when you want to manually inspect or edit individual rows in the filtered view, since the output is read-only and cannot be modified directly.
Performance-wise, FILTER is extremely fast on datasets up to a few hundred thousand rows but can slow down on million-row ranges, especially when combined with multiple criteria or nested with SORT and UNIQUE. If you hit performance issues, consider replacing the volatile range references with Excel Table structured references, or migrate the heavy lifting to Power Query, which is purpose-built for large-scale data transformation and refresh-on-demand workflows.
FILTER also handles the empty case gracefully through its third argument. Without it, a FILTER expression that matches zero rows returns the #CALC! error, which propagates through any downstream formulas. By supplying an if_empty value such as "No matches" or 0, you make your spreadsheet robust against data changes that might otherwise break a report. This small habit prevents a surprising number of broken dashboards and angry stakeholder emails.

Filters hide rows but do not delete them. If you copy a filtered range and paste it elsewhere, only visible cells transfer. However, if you select a filtered column and press Delete, only visible cells are cleared. Always verify your selection with Alt+; (Go To Special: Visible Cells Only) before destructive operations.
Even experienced Excel users hit filter problems, and the symptoms can be surprisingly varied. The most common issue is filters skipping rows in the middle of a dataset. This almost always traces back to a fully blank row inside the data block, which Excel interprets as the end of the range. The fix is to either delete the blank row or select the entire data range manually before turning on AutoFilter so that Excel uses your selection instead of auto-detecting boundaries.
Another frequent problem is filter arrows being grayed out or missing entirely. This typically happens when the worksheet is protected, when multiple sheets are grouped, or when the active cell is outside any recognizable data range. Unprotect the sheet from the Review tab, click a single sheet tab to ungroup, and click directly inside your data before pressing the filter shortcut. If arrows still fail to appear, check that you do not have merged cells in the header row, since merged headers break AutoFilter detection.
Filtering by color is one of the most powerful but least discoverable features. If you have conditionally formatted cells or manually colored them, the filter dropdown shows a Filter by Color submenu listing every color present in that column. This lets you isolate, say, all cells flagged red by a conditional rule that highlights overdue invoices. Combined with the practice of removing duplicates before analysis, color filtering can dramatically speed up data cleanup workflows.
When working with filtered data and formulas, remember that most aggregation functions ignore the visibility state of rows. SUM, COUNT, and AVERAGE all include hidden rows in their calculations. To get totals that respect the current filter, use SUBTOTAL or AGGREGATE instead. SUBTOTAL takes a function number as its first argument (9 for SUM, 1 for AVERAGE, 3 for COUNTA) and automatically excludes filtered-out rows. AGGREGATE goes further by also excluding error values and hidden rows from manual hiding.
One subtle gotcha involves text that looks like numbers. If a column contains values like 100 and "100" mixed together, the filter dropdown shows both as separate entries and the Number Filters submenu may behave inconsistently. The fix is to convert the entire column to a single data type, usually by selecting the column, clicking the warning icon, and choosing Convert to Number. Going forward, validate imported data with a dropdown list or data validation rule to prevent the problem from recurring.
Filtering interacts in surprising ways with VLOOKUP and other lookup functions. Lookups always search the underlying data, ignoring any active filter. So if you filter a table to show only Western sales and then write a VLOOKUP against that table, the formula returns results from the full dataset, not just the visible portion. This is usually what you want, but if you specifically need to look up only visible rows, you must combine INDEX, MATCH, and SUBTOTAL in a more complex array formula or switch to the FILTER function approach described above.
Finally, take advantage of slicers when working with Excel Tables and PivotTables. Slicers are visual filter controls that sit above your data as clickable buttons. They make filtering enormously more discoverable for non-technical users and look polished in shared workbooks. Insert a slicer from the Table Design tab or the PivotTable Analyze tab, choose which fields to expose, and your users can filter with a single click. Slicers also support cross-filtering, where one slicer narrows the options shown in another.
To get the most out of filtering in your daily workflow, build a few habits that pay dividends every time you open a spreadsheet. First, always convert your data to an Excel Table with Ctrl+T before doing any serious analysis. Tables auto-expand to include new rows, preserve filter arrows by default, and give you structured references that survive insertions and deletions. Almost every filter problem I troubleshoot in client workbooks would have been prevented by a single Ctrl+T at the start.
Second, memorize the keyboard shortcuts that surround filtering. Ctrl+Shift+L toggles AutoFilter. Alt+Down opens the dropdown on the active header cell. Alt+; selects only visible cells, which is essential before copying filtered data. Ctrl+Shift+End extends selection to the last cell of the dataset. Together these shortcuts let you filter, inspect, and export results without ever touching the mouse, which compounds into real time savings over hundreds of analyses.
Third, document non-obvious filters using a small notes column or a separate criteria block. A workbook that lands on a colleague's desk with mysterious filters applied is a recipe for confused decisions. Either clear filters before saving for distribution, or add a clearly labeled cell at the top of the sheet describing which filters are active and why. This single courtesy prevents countless reporting errors and earns you a reputation for clean, trustworthy work.
Fourth, learn when to graduate from AutoFilter to Power Query. Power Query is Microsoft's data transformation engine baked into modern Excel. It records your filtering, sorting, and cleanup steps as repeatable queries that refresh on demand. If you find yourself applying the same filter every Monday morning to a fresh data export, that is a perfect Power Query candidate. The upfront investment of an hour or two pays back enormously in saved manual effort and reduced error rates.
Fifth, master the interplay between filters and PivotTables. PivotTables have their own filter mechanisms including report filters, slicers, timelines, and label/value filters. These do not interact with AutoFilter on the source data, which is sometimes confusing. The cleanest pattern is to filter your source data with Power Query, leave it unfiltered in the worksheet, and let the PivotTable do all view-level filtering. This separation of concerns keeps your analysis transparent and your formulas correct.
Sixth, practice deliberate cleanup before filtering. Filters work best on clean data: consistent capitalization, no leading or trailing spaces, single data type per column, no merged cells. Use TRIM, CLEAN, PROPER, and UPPER to normalize text. Use Find and Replace to standardize abbreviations. Use the Remove Duplicates feature on the Data tab to eliminate accidental repeats. Five minutes of cleanup before filtering saves hours of debugging filter results that mysteriously exclude rows you expected to see.
Finally, keep practicing. Filtering looks simple but has hidden depths that reveal themselves only through repeated use. Build a personal cheat sheet of the filter recipes you use most often: top 10 customers by revenue, orders in the last 30 days, products with margin below 20 percent. Save these as named ranges, table queries, or FILTER formulas in a reference workbook. Over time this library becomes one of your most valuable Excel assets, and the skills compound into the kind of fluency that separates power users from casual ones.
Excel Questions and Answers
About the Author
Attorney & Bar Exam Preparation Specialist
Yale Law SchoolJames R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.