Skip to main content
ExcelFILTER with Multiple AND/OR ConditionsDynamic ArrayData FilteringAdvanced Excel

The Problem

Basic filters are fine for one quick pass. They start to break down when you need logic such as:

  • only Premium products
  • from East or West
  • during Q1 or Q2

At that point, manual filtering becomes repetitive and hard to trust. You apply one filter, then another, then copy the result somewhere else, and the output is already stale the next time the source data changes.

What is the FILTER function? FILTER is a dynamic array function that returns only the rows that meet criteria you define. The real power comes from building the include argument with logical tests, especially when you combine AND and OR conditions.

Business Context & Real-World Use Case

Imagine a regional sales manager reviewing transaction data every week. They need to isolate premium sales from selected regions and selected quarters without rebuilding the report each time.

Doing that manually in the filter pane works for one-off checks, but not for a reusable worksheet. A formula-based filter is more useful because it updates itself when the source data changes.

That is why FILTER is so valuable in reporting work. It lets you turn business rules into a live extraction formula instead of a sequence of clicks.

The Ingredients: Understanding the Setup

The syntax is:

=FILTER(array, include, [if_empty])
Parameter Description
array The data range you want returned.
include A TRUE/FALSE test for each row in the array.
[if_empty] Optional fallback text if nothing matches.

For logical combinations:

  • Use * for AND
  • Use + for OR

Examples:

(A:A="East")*(B:B="Premium")

means East and Premium.

(A:A="East")+(A:A="West")

means East or West.

The Recipe: Step-by-Step Instructions

Suppose your sales data sits in A2:E11:

Product Type Region Quarter Sales Amount Status
Electronics North Q1 1200 Standard
Clothing East Q2 850 Standard
Home Goods West Q3 1500 Premium
Electronics South Q1 2100 Premium
Clothing East Q4 600 Standard
Home Goods West Q2 1900 Premium
Electronics North Q3 1100 Standard
Clothing East Q1 980 Premium
Home Goods South Q4 1300 Standard
Electronics West Q2 2500 Premium

Now you want rows where:

  • Status = "Premium"
  • Region = "East" or "West"
  • Quarter = "Q1" or "Q2"

Use this formula:

=FILTER(
  A2:E11,
  (E2:E11="Premium")*
  ((B2:B11="East")+(B2:B11="West"))*
  ((C2:C11="Q1")+(C2:C11="Q2")),
  "No matching records"
)

That returns only the rows that meet all three business rules.

Why This Works

Each condition produces TRUE/FALSE values by row.

  • Status="Premium" returns TRUE only for premium rows.
  • (Region="East")+(Region="West") returns TRUE for either region.
  • (Quarter="Q1")+(Quarter="Q2") returns TRUE for either quarter.

When you multiply those condition groups together with *, only rows that satisfy every required group remain.

Pro Tips

  1. Put criteria in cells if you want a reusable dashboard instead of hard-coded values.
  2. Use Excel Tables if the dataset grows regularly.
  3. Add an [if_empty] message so the result stays readable when no data matches.
  4. Combine FILTER with SORT or UNIQUE when you want ordered or deduplicated results.

Troubleshooting: Common Errors & Fixes

1. #CALC!

  • Symptom: Excel returns #CALC!
  • Cause: Nothing matched, and no fallback text was supplied.
  • Fix: Add the third argument, for example "No matching records".

2. #VALUE!

  • Symptom: The formula errors out immediately.
  • Cause: One of the condition ranges is not the same height as the source array.
  • Fix: Make sure every condition range lines up row-for-row with the filtered array.

3. Results look wrong

  • Symptom: Rows are returned, but not the ones you expected.
  • Cause: Parentheses or AND/OR operators are grouped incorrectly.
  • Fix: Group each OR condition inside its own parentheses before combining with AND logic.

Quick Reference

Item Value
Syntax =FILTER(array, include, [if_empty])
AND logic *
OR logic +
Best use case Dynamic filtered lists that update automatically

Related Functions

EC

Reviewed by Daniel Park

Spreadsheet analyst and documentation editor focused on practical Excel workflows, reporting logic, and error-proof formula guides for real business use.

Read more about our editorial approach →

You might also find these useful 💡