Autofilter function Not Equal To with more than 2 criteria

tarekgemayel

New Member
Joined
Nov 30, 2015
Messages
2
Hello,

I have a huge list with 2000+ entries that i need to filter.
I know that if i have 2 criteria i can use
Code:
With rng
   .AutoFilter Field:=2, Criteria1:="<>4", Operator:=xlAnd, Criteria2:="<>10"
   .Offset(1).Resize(rng.Rows.Count - 1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
   .AutoFilter
End With

However if i have more than 2 criteria, the method described above no longer works.

All the help is appreciated
Thanks
T.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Welcome to the MrExcel board!

Have a look at Advanced Filter rather than AutoFilter.

If you need more help, give us more details about what you have on your sheet and where it is as well as exactly what you are trying to achieve.
 
Upvote 0
Thanks Peter.
Ill try that later, however for the time being i was able to solve my problem with a Helper Column displaying "TRUE" and "FALSE" value and then filtering accordingly.
 
Upvote 0
OK. Thanks for letting us know that you are "resolved" for the time being at least. :)
 
Upvote 0

Forum statistics

Threads
1,215,706
Messages
6,126,336
Members
449,310
Latest member
zztt388

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