The FILTER function lets you extract just the information you need from a larger dataset, based on whatever criteria you specify. Before FILTER was introduced, this kind of task typically required using either the AutoFilter or advanced filtering tools, which were used to hide rows that didn't meet the filtering criteria. The FILTER function, on the other hand, returns the filtered data from the original dataset, which means no hidden rows in your worksheet. And, because FILTER is a dynamic function, the results are updated automatically as your original data changes.
When you use FILTER, Excel looks through your specified range, evaluates each row or column against your criteria, and then returns only those that match. For example, let's say you have a table of sales data in columns A through D, with headers for region, salesperson, product, and sales amount. If you want to show only the records where the region is "East," you could use the following:
=FILTER(A2:D100,A2:A100="East")
Excel scans the range A2:A100, checks which rows contain "East," and then returns all matching rows from columns A through D. The results spill into a new area on your worksheet and stay linked to the source. If you later add more "East" records or change a region name, the filtered list updates automatically.
If there are no rows that meet your criteria, then FILTER returns a #CALC! error. If you don't want the error to return, you can add an optional third parameter that specifies what should be returned:
=FILTER(A2:D100,A2:A100="East","No matches")
You can use multiple criteria in your filter by combining logical expressions with arithmetic operators. For example, suppose you want only sales from the East region with amounts greater than $10,000. You could change the second parameter as shown here:
=FILTER(A2:D100,(A2:A100="East")*(D2:D100>10000),"No matches")
The multiplication symbol between the two conditions acts like "AND," meaning both must be true for a row to appear. If you wanted an "OR" condition, such as East or West regions, you would use a plus sign:
=FILTER(A2:D100,(A2:A100="East")+(A2:A100="West"), "No matches").
Because FILTER is a dynamic array function, its results spill automatically into multiple cells; you don't need to copy the formula down or across. The spilled range expands or contracts depending on how many records meet your conditions.
There are a few things to remember. The criteria you specify in parameter 2 must evaluate to TRUE or FALSE for each item in range being evaluated. If they don't match (in size), you'll get a mismatch error. Also, FILTER is case-insensitive—"East" and "east" are treated as the same.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (14014) applies to Microsoft Excel 2021, 2024, and Excel in Microsoft 365.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
If you need to know the number of columns in a particular range, you can use the COLUMNS worksheet function. This tip ...
Discover MoreNeed a quick summary table for the data in a worksheet? A great way to get the desired summary is to use the GROUPBY ...
Discover MoreYou can use the IF worksheet function to test for a number of different conditions or values. You can't use it to check ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2026 Sharon Parq Associates, Inc.
Comments