AND vs * in Excel FILTER: Multiple Criteria That Work
By ExcelReady TeamUpdated 8 min read
The short answer
Inside FILTER, use * between bracketed conditions, not the AND function. AND() squeezes a whole range into one TRUE or FALSE, so FILTER can't keep or drop rows one by one. (B2:B8="East")*(C2:C8="Open") gives one result per row. Use + for OR. Keep AND() for single-row tests such as IF, helper columns and conditional formatting.
Key takeaways
- AND() and OR() return one TRUE or FALSE for everything you give them, so they can't drive FILTER row by row.
- Multiply bracketed conditions for AND and add them for OR: (B2:B8="East")*(C2:C8="Open").
- Brackets matter: Excel multiplies before it adds, and compares last of all.
- Added OR conditions can give 2. Use ((...)+(...))>0 when you count matches, or one row is counted twice.
- FILTER needs Excel 2021, Excel 2024 or Microsoft 365, and returns #CALC! when nothing matches unless you give if_empty.
On this page+
- AND() vs * in FILTER at a glance
- The order log we'll filter
- Why AND() doesn't work inside FILTER
- How * gives FILTER one answer per row
- + for OR, and why brackets matter
- When to use AND()
- When to use *
- Empty results and versions
- What a job test usually checks
- How to decide: a quick checklist
- Common mistakes with AND and * in FILTER
- Our recommendation
- Practise it
AND vs asterisk in Excel FILTER has a short answer: inside FILTER, use *, not AND(). The AND function boils a whole range down to one TRUE or FALSE, while multiplying bracketed conditions gives FILTER the one-answer-per-row list it needs. This comparison is for anyone whose FILTER formula "should work" but doesn't, and for anyone preparing for a test where FILTER with two conditions is a common task.
AND() vs * in FILTER at a glance#
Both mean "all conditions must be true". They differ in how many answers they give back.
| Feature | AND() function | * between conditions |
|---|---|---|
| What it returns for ranges | One TRUE or FALSE for all values together | One 1 or 0 for each row |
| Works as FILTER's include argument | No | Yes |
| Works in a one-row test (IF, helper column, rule) | Yes, returns TRUE/FALSE | Yes, but returns 1/0 |
| OR version | OR() | + |
| Brackets needed | No, commas separate the tests | Yes, around every condition |
| Readability | Reads like English | Symbols take practice |
| Version | Every Excel version | The maths works everywhere; FILTER needs Excel 2021, 2024 or Microsoft 365 |
The order log we'll filter#
All examples use this order log in A1:D8. It's the kind of list you get from a sales or support system.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order | Region | Status | Amount |
| 2 | 1041 | East | Open | 320 |
| 3 | 1042 | West | Shipped | 150 |
| 4 | 1043 | East | Shipped | 410 |
| 5 | 1044 | North | Open | 95 |
| 6 | 1045 | East | Open | 270 |
| 7 | 1046 | West | Open | 500 |
| 8 | 1047 | North | Shipped | 220 |
The goal: list the orders that are in the East region and still Open.
Why AND() doesn't work inside FILTER#
AND() fails because it answers one question about the whole range, not one question per row. Try it:
=FILTER(A2:D8,AND(B2:B8="East",C2:C8="Open"))Excel works out all 14 tests (7 regions and 7 statuses), then AND asks "is every single one TRUE?" They aren't, so it returns one FALSE. FILTER needed seven answers, one per row, and got one. Excel returns an error instead of a list.
Even if every row happened to be an East open order, AND would still hand back a single TRUE rather than seven. The function is built to summarise, which is exactly what FILTER doesn't want. OR() has the same problem: OR(B2:B8="East",C2:C8="Open") returns one TRUE because at least one value somewhere is TRUE.
How * gives FILTER one answer per row#
Multiplication works on each position of the two lists separately. Here's what Excel calculates for (B2:B8="East")*(C2:C8="Open"):
| Row | Order | B2:B8="East" | C2:C8="Open" | Product |
|---|---|---|---|---|
| 2 | 1041 | TRUE | TRUE | 1 |
| 3 | 1042 | FALSE | FALSE | 0 |
| 4 | 1043 | TRUE | FALSE | 0 |
| 5 | 1044 | FALSE | TRUE | 0 |
| 6 | 1045 | TRUE | TRUE | 1 |
| 7 | 1046 | FALSE | TRUE | 0 |
| 8 | 1047 | FALSE | FALSE | 0 |
In arithmetic, TRUE counts as 1 and FALSE as 0, so the product is 1 only when both tests pass. FILTER keeps rows where the include value is TRUE or any non-zero number:
=FILTER(A2:D8,(B2:B8="East")*(C2:C8="Open"))The result spills two rows: 1041, East, Open, 320 and 1045, East, Open, 270. Leave the cells below and to the right empty, or you'll get #SPILL!. For the basics of spilling, see the beginner's guide to the FILTER function.
The same trick handles two tests on one column, where AND() also fails. =FILTER(A2:A8,(D2:D8>=200)*(D2:D8<=400)) returns orders 1041, 1045 and 1047, the amounts from 200 to 400.
+ for OR, and why brackets matter#
Use + when any one condition is enough. (B2:B8="East")+(C2:C8="Open") gives 2, 0, 1, 1, 2, 1, 0 down the rows, so this returns five orders: 1041, 1043, 1044, 1045 and 1046:
=FILTER(A2:A8,(B2:B8="East")+(C2:C8="Open"))A total of 2 is fine for FILTER, since any non-zero number keeps the row. It is not fine when you count. =SUM((B2:B8="East")+(C2:C8="Open")) returns 7, because orders 1041 and 1045 are counted twice. Turn the totals back into TRUE/FALSE first:
=SUM(--(((B2:B8="East")+(C2:C8="Open"))>0))This returns the correct 5.
When you mix AND and OR, brackets decide the meaning. Excel multiplies before it adds, and it does comparisons (=, >) last of all. Compare:
| Formula | Excel reads it as | Orders returned |
|---|---|---|
(C2:C8="Open")*((B2:B8="East")+(B2:B8="West")) | Open and (East or West) | 1041, 1045, 1046 |
(C2:C8="Open")*(B2:B8="East")+(B2:B8="West") | (Open and East) or West | 1041, 1042, 1045, 1046 |
The second one wrongly includes 1042, a shipped West order. And with no brackets at all, B2:B8="East"*C2:C8="Open" tries to multiply the text "East" by the statuses first, which gives #VALUE! errors. The guide to FILTER with multiple criteria has more AND/OR combinations to copy.
When to use AND()#
Use AND() when you test one row at a time and want a clear TRUE or FALSE.
- In IF:
=IF(AND(B2="East",C2="Open"),"Chase","")in E2, filled down, labels rows 2 and 6. - In a helper column:
=AND(B2="East",C2="Open")filled down gives TRUE/FALSE per row. FILTER can then use that column directly:=FILTER(A2:D8,E2:E8). This is handy when the rule is long and you want colleagues to see it. - In conditional formatting rules: a rule such as
=AND($B2="East",$C2="Open")is checked one row at a time, so AND() works there.
The difference between the two functions themselves is covered in AND vs OR in Excel.
When to use *#
Use * whenever a formula has to judge many rows in one go.
- FILTER's include argument, as above.
- Single-number answers from FILTER.
=SUM(FILTER(D2:D8,(B2:B8="East")*(C2:C8="Open")))returns 590.=ROWS(FILTER(A2:A8,(B2:B8="East")*(C2:C8="Open")))returns 2. - Counting without FILTER.
=SUM((B2:B8="East")*(C2:C8="Open"))also returns 2, and works with SUMPRODUCT in older versions.
One trap with ROWS: if you add if_empty, say "None", and nothing matches, FILTER returns one cell with "None", so ROWS returns 1, not 0. Count with SUM or COUNTIFS when zero matches is possible.
Empty results and versions#
When nothing passes, FILTER returns #CALC!, because Excel can't show an empty list. =FILTER(A2:D8,(B2:B8="South")*(C2:C8="Open")) does exactly that. Add the third argument to show a message instead:
=FILTER(A2:D8,(B2:B8="South")*(C2:C8="Open"),"No orders")FILTER exists in Excel 2021, Excel 2024, Microsoft 365 and Excel for the web. In Excel 2019 and older, use the AutoFilter buttons on the Data tab instead. FILTER function vs AutoFilter compares the two.
What a job test usually checks#
Tests that include FILTER tend to ask for two conditions at once, because that's where the AND() mistake shows up. A typical task: "In F2, list the open orders for the region in H1." The expected answer uses a cell reference and *, such as =FILTER(A2:D8,(B2:B8=H1)*(C2:C8="Open"),"None"). Some tasks ask for one number instead of a list, which is where SUM or ROWS around FILTER comes in. If a task needs one matching value rather than every match, XLOOKUP may be the better tool, as XLOOKUP vs FILTER explains.
How to decide: a quick checklist#
- Is the formula judging a whole range at once (FILTER, SUM over arrays, SUMPRODUCT)? Yes: use
*and+. - Is it testing one row and filled down, like IF in a helper column? Yes: AND() and OR() are clearer.
- Is it a conditional formatting rule? Yes: AND() is fine, because the rule runs per cell.
- Are you counting OR matches? Yes: use
+, then>0so no row counts twice. - Does the file need to open in Excel 2019? Yes: avoid FILTER. Use COUNTIFS, SUMIFS or SUMPRODUCT with
*.
Common mistakes with AND and * in FILTER#
- Using AND() or OR() as the include argument. You get an error, not rows. Switch to
*or+. - Leaving out brackets. Every condition needs its own pair:
(B2:B8="East"). - Forgetting the outer brackets around OR inside AND.
(C2:C8="Open")*((B2:B8="East")+(B2:B8="West"))needs both sets. - Ranges of different heights.
(B2:B8="East")*(C2:C9="Open")doesn't line up withA2:D8, and FILTER returns an error. - Summing OR results. Matches on both conditions count twice unless you add
>0. - No if_empty on a filter that may match nothing. A report that shows #CALC! looks broken;
"No orders"looks intentional.
Our recommendation#
Inside FILTER, always combine conditions with * for AND and + for OR, and wrap every condition in its own brackets. Add if_empty to any FILTER that could come back empty. Keep the AND and OR functions for formulas that look at one row at a time: IF statements, helper columns and conditional formatting rules. If a rule is getting long, a helper column with AND() plus =FILTER(A2:D8,E2:E8) is a perfectly good, readable answer.
Practise it#
Try the East-open-total exercise on this page: one FILTER, one *, wrapped in SUM. Then practise the FILTER function in a live spreadsheet, and practise AND, OR and NOT for the one-row tests where the functions belong. Keep the FILTER function reference open for the syntax.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Total the Amount of orders that are in the East region and still Open. In F2, wrap FILTER in SUM and combine the two conditions with *.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Amount | East open total | |||||
| 2 | |||||||
| 3 | |||||||
| 4 | |||||||
| 5 | |||||||
| 6 | |||||||
| 7 | |||||||
| 8 | |||||||
| 9 | |||||||
| 10 | |||||||
| 11 |
Tip: Filter the Amount column D2:D8. Put each test in its own brackets, (B2:B8="East") and (C2:C8="Open"), multiply them, then wrap the whole FILTER in SUM.
Practise this in a lesson
Frequently asked questions
Can I use the AND function inside FILTER in Excel?
Not for the include argument. AND looks at every value in the ranges together and returns a single TRUE or FALSE, but FILTER needs one TRUE or FALSE for each row. Multiply bracketed conditions instead.
What does the asterisk mean in an Excel FILTER formula?
It's ordinary multiplication. Each condition gives TRUE or FALSE per row, Excel treats them as 1 and 0, and the product is 1 only when every condition is TRUE. That's AND logic, row by row.
How do I do OR in FILTER?
Add the bracketed conditions with +, as in =FILTER(A2:D8,(B2:B8="East")+(C2:C8="Open")). FILTER keeps any row whose total is not 0.
Why does my FILTER formula return #CALC!?
No rows met your conditions, and Excel can't return an empty list. Add a third argument, such as "No orders", to show that text instead.
When should I still use the AND function?
Whenever you test one row at a time: in IF, in a helper column filled down, or in a conditional formatting rule. There, AND is easier to read than multiplication and returns TRUE or FALSE.