Filter out words using the Filter Function with Table References

Excel2021

New Member
Joined
Mar 26, 2021
Messages
46
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am using the filter function to pull data from a table in excel using table references. I need to filter out any row containing 2 specific words in a specific column. I am having difficulty doing this with table references as all the examples online show this done with cell ranges not table references/ranges. I have attached an image with my filtered results/formula in Cell I4 as I am unable to add the workbook. I would like to filter out any row in the "Customer Name" column with the words "Lemon" or "Pear".
 

Attachments

  • Filter Example.PNG
    Filter Example.PNG
    84.1 KB · Views: 18
Another option is
Excel Formula:
=FILTER(Table1,(Table1[GL Account]=3000)*(Table1[No Date/Past Due/OK]="Past Due")*(Table1[Current Month]=FALSE)*(ISERR(SEARCH("Lemon",Table1[Customer Name])))*(ISERR(SEARCH("Pear",Table1[Customer Name]))))
This worked. Thanks. I just had to edit the Customer Name because the (T/F) was left out.
 
Upvote 0

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.
Glad we could help & thanks for the feedback.
 
Upvote 0
You're headers are slightly different, try
Excel Formula:
=FILTER(Table1,(Table1[GL Account]=3000)*(Table1[No Date/Past Due/OK]="Past Due")*(Table1[Current Month (T/F)]=FALSE)*(ISERR(SEARCH("Lemon",Table1[Customer Name])))*(ISERR(SEARCH("Pear",Table1[Customer Name]))))
Oh I see, I did not include the "(T/F)" on current month.
 
Upvote 0
There is no need to use [#data] as it simply returns what is in Table1
 
Upvote 0
Hi Excel2021
use this one.

Filter_Words is the named range for the words which you want to filter.

=FILTER(Table1[#All],
(LET(a,Table1[[#All],[Customer Name]],b,Filter_Words,BYROW(a,LAMBDA(r,SUM(IF(ISNUMBER(FIND(b,r)),1,0)))))=1)*
(Table1[[#All],[GL Account]]=3000)*(Table1[[#All],[No Date/Past Due/OK]]="Past Due")*(Table1[[#All],[Current Month]]=FALSE)
)
 

Attachments

  • FilterWords.JPG
    FilterWords.JPG
    161.9 KB · Views: 4
Upvote 0
There is no need to use [#data] as it simply returns what is in Table1
How would I do this for multiple criteria (Using "+" in the filter function)? I would like to apply the same filter for multiple GL Accounts in the same table.

New Formula (See image below)

=FILTER(Table1[#Data],(Table1[[#Data],[GL Account]]=3000)*(Table1[[#Data],[No Date/Past Due/OK]]="Past Due")*(Table1[[#Data],[Current Month (T/F)]]=FALSE)+(Table1[[#Data],[GL Account]]=4000)*(Table1[[#Data],[No Date/Past Due/OK]]="Past Due")*(Table1[[#Data],[Current Month (T/F)]]=FALSE),"")

Thanks
 

Attachments

  • Filter Example2.PNG
    Filter Example2.PNG
    105.5 KB · Views: 2
Upvote 0
How about
Excel Formula:
=FILTER(Table1,((Table1[GL Account]=3000)+(Table1[GL Account]=4000))*(Table1[No Date/Past Due/OK]="Past Due")*(Table1[Current Month (T/F)]=FALSE)*(ISERR(SEARCH("Lemon",Table1[Customer Name])))*(ISERR(SEARCH("Pear",Table1[Customer Name]))))
 
Upvote 0
How about
Excel Formula:
=FILTER(Table1,((Table1[GL Account]=3000)+(Table1[GL Account]=4000))*(Table1[No Date/Past Due/OK]="Past Due")*(Table1[Current Month (T/F)]=FALSE)*(ISERR(SEARCH("Lemon",Table1[Customer Name])))*(ISERR(SEARCH("Pear",Table1[Customer Name]))))
Thanks, that works exactly how I wanted it to in the example file.
 
Upvote 0

Forum statistics

Threads
1,224,810
Messages
6,181,079
Members
453,021
Latest member
Justyna P

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