Multiple Filter Formula in Excel: Step-by-Step
In this article
The FILTER function in Excel lets you extract rows that meet one or more conditions. To apply multiple filters, combine FILTER with boolean logic: multiply conditions for AND (e.g., (A2:A100="North")*(B2:B100>1000)) or add them for OR (e.g., (A2:A100="North")+(B2:B100>1000)). This works in Excel 365, Excel 2021, and Excel for the web. The result spills automatically; no need to drag formulas.
What You'll Need
- Excel 365, Excel 2021, or Excel for the web (FILTER is not available in older versions).
- A data range with headers, ideally formatted as a table (Ctrl+T) for easier referencing.
- Basic understanding of cell references and comparison operators (=, >, <, etc.).
Step-by-Step
- Set up your data. Ensure your data has clear headers and no blank rows. For example, columns A:C contain Region, Sales, and Rep. Select the range and press Ctrl+T to create a table named
Table1(or use a range likeA2:C100). - Choose a destination. Click an empty cell where you want the filtered results to appear. Ensure there's enough empty space below and to the right for the spill range.
- Write the FILTER formula with AND logic. To show rows where Region is "North" AND Sales > 1000, type:
=FILTER(A2:C100, (A2:A100="North") * (B2:B100>1000), "No results")
The multiplication acts as AND. The third argument is optional and displays if no matches are found. - Write the FILTER formula with OR logic. To show rows where Region is "North" OR Sales > 1000, use addition:
=FILTER(A2:C100, (A2:A100="North") + (B2:B100>1000), "No results")
The plus sign acts as OR. - Combine AND and OR. For (Region="North" OR Region="South") AND Sales>1000, use:
=FILTER(A2:C100, ((A2:A100="North")+(A2:A100="South")) * (B2:B100>1000), "No results")
Use parentheses to control the order of operations. - Press Enter. The results spill into adjacent cells. If you see a #SPILL! error, clear the cells below or move the formula to an empty area.
- Adjust for text vs. numbers. Text criteria must be in quotes (e.g., "North"). Numeric criteria are unquoted (e.g., >1000). For dates, use DATE function or a cell reference (e.g., >DATE(2024,1,1)).
- Use cell references for criteria. Instead of hardcoding, reference cells (e.g.,
(A2:A100=G1)*(B2:B100>H1)) so you can change filters without editing the formula. - Handle blank cells. If your data may contain blanks, add a condition like
(A2:A100<>"")to exclude them. - Test and verify. Check that the spilled results match your expectations. Use the filter dropdowns on the original table to cross-check counts.
Common Mistakes
- Using AND/OR functions instead of boolean logic. FILTER requires array logic; AND() and OR() don't work across arrays.
- Forgetting parentheses. Without them, Excel may evaluate conditions incorrectly. Always wrap each condition in parentheses.
- Mismatched range sizes. All ranges in FILTER must have the same number of rows. For example, A2:A100 and B2:B100 are fine; A2:A100 and B2:B99 cause errors.
- Not leaving enough spill space. If cells below or to the right contain data, you'll get #SPILL!. Clear them or move the formula.
- Using text without quotes. Criteria like North must be "North".
- Ignoring case sensitivity. FILTER is not case-sensitive; "north" matches "North". For case-sensitive, use EXACT inside the condition.
Tips
- Use structured references with tables (e.g.,
Table1[Region]) for more readable formulas. - Combine FILTER with SORT or SORTBY to order results:
=SORT(FILTER(...)). - Use the third argument to display a custom message like "No matching records" instead of #CALC!.
- For multiple criteria on the same column (e.g., Region is North or South), use addition:
(Region="North")+(Region="South"). - To filter by partial text, use ISNUMBER(SEARCH("text", range)) as a condition.
- Remember that FILTER returns an array; you can't edit individual cells in the spill range.
Troubleshooting
- #CALC! error: No matches found and no third argument provided. Add a value like "No results".
- #VALUE! error: Ranges are different sizes or contain errors. Check that all ranges have the same row count and no error values.
- #SPILL! error: The spill range is blocked. Select the formula cell, check the dashed border, and clear any cells in the way.
- #NAME? error: FILTER is not supported in your Excel version. Use Excel 365 or 2021, or try the Advanced Filter feature (Data > Advanced).
- Formula returns unexpected results: Verify operator precedence; use parentheses around each condition. Also check for leading/trailing spaces in text criteria.
- Performance issues with large data: Limit ranges to the actual data size, or use tables to avoid processing empty rows.
Frequently Asked Questions
Can I use FILTER with multiple criteria in different columns?
Yes. Multiply conditions for AND, add for OR, and use parentheses to group.
Does FILTER work in Excel 2019?
No. FILTER is available only in Excel 365, Excel 2021, and Excel for the web. For older versions, use Advanced Filter or helper columns.
How do I filter for multiple values in the same column?
Use addition: (A2:A100="North")+(A2:A100="South"). This returns TRUE if either condition is met.
Can I use wildcards with FILTER?
Yes, with functions like ISNUMBER(SEARCH("criteria", range)) or COUNTIF with wildcards. FILTER itself doesn't support wildcards directly.
Why does my FILTER formula return a #SPILL! error?
The spill range is not empty. Clear the cells below and to the right of the formula, or move the formula to an empty area.
Can I filter by date range?
Yes. Use comparison operators with dates, e.g., (A2:A100>=DATE(2024,1,1))*(A2:A100<=DATE(2024,12,31)).