Too many criteria in FILTER?

dreid1011

Well-known Member
Joined
Jun 4, 2015
Messages
3,605
Office Version
  1. 365
Platform
  1. Windows
Am I trying to do too much with this FILTER formula?

=FILTER('Property Info'!A2:F8302,('Property Info'!E2:E8302="RESIDENCE")+('Property Info'!E2:E8302="MANF STRCT")+('Property Info'!E2:E8302="MULTI-FMLY")*('Property Info'!D2:D8302<>"110")*('Property Info'!D2:D8302<>"910")*('Property Info'!D2:D8302<>"915")*('Property Info'!D2:D8302<>"925")*('Property Info'!D2:D8302<>"935")*('Property Info'!D2:D8302<>"945")*('Property Info'!D2:D8302<>"955"))

WIth just the blue portion, I was getting the results I desired and column D was excluding values of 110, 910, 915, 925, 935, 945 & 955. After I added the orange portion, the results were no longer excluding those values. I did try swapping the + / * order, but that didn't help either.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
how about adding brackets

=FILTER(A2:B6,((A2:A6="a")+(A2:A6="e"))*((B2:B6<>1)*(B2:B6<>3)))

(('Property Info'!E2:E8302="RESIDENCE")+('Property Info'!E2:E8302="MANF STRCT")+('Property Info'!E2:E8302="MULTI-FMLY"))
*
(('Property Info'!D2:D8302<>"110")*('Property Info'!D2:D8302<>"910")*('Property Info'!D2:D8302<>"915")*('Property Info'!D2:D8302<>"925")*('Property Info'!D2:D8302<>"935")*('Property Info'!D2:D8302<>"945")*('Property Info'!D2:D8302<>"955")))
so you have the ORs grouped and then the AND
as shown in this very simple example


Book1
ABCDEF
1
2a1e2
3e1a2
4e2
5a2
6e1
7e2
Sheet1
Cell Formulas
RangeFormula
E2:F3E2=FILTER(A2:B6,((A2:A6="a")+(A2:A6="e"))*((B2:B6<>1)*(B2:B6<>3)))
Dynamic array formulas.
 
Upvote 0
Solution
how about adding brackets

=FILTER(A2:B6,((A2:A6="a")+(A2:A6="e"))*((B2:B6<>1)*(B2:B6<>3)))

(('Property Info'!E2:E8302="RESIDENCE")+('Property Info'!E2:E8302="MANF STRCT")+('Property Info'!E2:E8302="MULTI-FMLY"))
*
(('Property Info'!D2:D8302<>"110")*('Property Info'!D2:D8302<>"910")*('Property Info'!D2:D8302<>"915")*('Property Info'!D2:D8302<>"925")*('Property Info'!D2:D8302<>"935")*('Property Info'!D2:D8302<>"945")*('Property Info'!D2:D8302<>"955")))
so you have the ORs grouped and then the AND
as shown in this very simple example


Book1
ABCDEF
1
2a1e2
3e1a2
4e2
5a2
6e1
7e2
Sheet1
Cell Formulas
RangeFormula
E2:F3E2=FILTER(A2:B6,((A2:A6="a")+(A2:A6="e"))*((B2:B6<>1)*(B2:B6<>3)))
Dynamic array formulas.
Ah, yes that makes sense. Thank you.
 
Upvote 0
Just as an alternative, you can do something like this with MAP to create the criteria:

Excel Formula:
=FILTER('Property Info'!A2:F8302,MAP('Property Info'!E2:E8302,'Property Info'!D2:D8302,LAMBDA(e,d,AND(OR(e={"RESIDENCE","MANF STRCT","MULTI-FMLY"}),NOT(OR(d={"110","910","915","925","935","945","955"}))))))
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top