With adavnced filter, how do I exclude a value?

nmss18

Active Member
Joined
Jun 28, 2011
Messages
312
Hello,
I am trying to use the advanced criter filter to filter OUT a value. For example. In the table below, how do I display everything but beverages. I am using the <> to filter this out but it is not working.
Any assistance would be grateful.
Thanks,
nmss18

<form id="aspnetForm" method="post" name="aspnetForm" action="http://office.microsoft.com/en-us/excel-help/filter-by-using-advanced-criteria-HP010073942.aspx">Type</form>SalespersonSales
<>Beverages
<form id="aspnetForm" method="post" name="aspnetForm" action="http://office.microsoft.com/en-us/excel-help/filter-by-using-advanced-criteria-HP010073942.aspx">Type</form>SalespersonSales
BeveragesSuyama$5,122
MeatDavolio$450
produceBuchanan$6,328
ProduceDavolio$6,544

<tbody>
</tbody><colgroup><col span="3"></colgroup>
 
Aladin,
Your solution worked. Thanks much.

You are welcome. Thanks for providing feedback.

Do you have a way to reference the exclusion list from another worksheet? because, my list of email addresses to exclude could be significantly large and I would rather place the exclusion list on another worksheet to avoid the clutter.
...

You can set up the exclude list in a different area on a different sheet... For example:

=ISNA(MATCH($A9,Exclude!$A$1:$A$2,0))

where the items to exclude are in A1:A2 on the Exclude sheet.
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Aladin, I tried your exact example and it works fine. Thanks for the code.
How to exclude if BEVERAGES or BeverageS?
 
Upvote 0
It is excluding Beverages and Produce. Fine. It is not filtering if data is Good Beverages and Nice Produce. It should. Further it should not filter BEVERAGES and ProDuce. Please help.
 
Upvote 0
Aladin, I tried your exact example and it works fine. Thanks for the code.
How to exclude if BEVERAGES or BeverageS?

It is excluding Beverages and Produce. Fine. It is not filtering if data is Good Beverages and Nice Produce. It should. Further it should not filter BEVERAGES and ProDuce. Please help.

Change the MATCH formula in A5 to:

=SUMPRODUCT(ISNUMBER(FIND($A$1:$A$2,$A9))+0)=0

Note that an item either partially or as whole must equal the items in A1:A2 for exclusion to work.
 
Upvote 0
THANKS Aladin Akyurek,
Works perfectly.
Appreciate your help. Learning new things.
Hope others also will be befitted by your suggestions.
Thanks once again.
 
Upvote 0
Hi

This is just what I've been after but I need one extra thing.

Can this work with not including certain criteria and not including blank cells

Thanks
 
Upvote 0
Hi
Can this work with not including certain criteria and not including blank cells
Thanks

I think I have done this, but please say if there is a better solution

Code:
=IF(AND(COUNTBLANK($BG$6:$BG$12)>0,ISBLANK(BG21)),FALSE,ISNA(MATCH(BG21,$BG$6:$BG$12,0)))

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
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