FILTER FORMULA

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
832
Office Version
  1. 365
Platform
  1. Windows
Hi

I would like help with the following 2 formulas
Filter A:B where D IS PIG OR D ISNT Hamster or Squirrel

Result would be:
an
cp
er
gt
iv
kx
ly
mz

Then Filter A:B where D IS PIG OR D ISNT Hamster or Squirrel AND C Doesn’t Contain ca

Result would be:
cp
er
iv
kx
mz


Data is in Columns A2:D14

ancabbagepig
bocanHamster
cpxdog
dqxSquirrel
erxRabbit
fsxSquirrel
gtscancat
huxHamster
ivxpig
jwxHamster
kxxdog
lycanpig
mzxcat



Thanks
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
For the first case, how about: =FILTER(A2:B14,(D2:D14="pig")+((D2:D14<>"Hamster")*(D2:D14<>"Squirrel")))
 
Upvote 0
Second case, how about this: =FILTER(A2:B14,((D2:D14="pig")+((D2:D14<>"Hamster")*(D2:D14<>"Squirrel")))*ISERROR(FALSE=(SEARCH("ca",C2:C14))))
 
Upvote 0
Solution
For the first case, how about: =FILTER(A2:B14,(D2:D14="pig")+((D2:D14<>"Hamster")*(D2:D14<>"Squirrel")))
Thanks that one works. I had the + and * wrong way round

Do you know how I can also Exclude anything that included ca

I tried below but didnt work
=FILTER(A2:B14,(D2:D14="pig")+((D2:D14<>"Hamster")*(D2:D14<>"Squirrel"))*ISNUMBER(SEARCH("<>*ca*",C2:C14)))
 
Upvote 0
Second case, how about this: =FILTER(A2:B14,((D2:D14="pig")+((D2:D14<>"Hamster")*(D2:D14<>"Squirrel")))*ISERROR(FALSE=(SEARCH("ca",C2:C14))))
Thanks. was posting my atempted solution which didn't work just after you. was close but no cigar ;)
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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