filtering for <> not a numer

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
440
Office Version
  1. 2016
Hey Guys,

I have the following

ActiveSheet.Range("$A$1:$AV$6000").AutoFilter Field:=6, Criteria1:=Array( _
"<>1110", "<>2220"), Operator:=xlFilterValues
basically I am trying to unclick the 1110 and 2220 values. its not working. can anyone help?

Jordan
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
If you just have two values try
VBA Code:
ActiveSheet.Range("A1:AV1").AutoFilter 6, "<>1110", xlAnd, "<>2220"
You can only use an array if it's an exact match
 
Upvote 0
If you just have two values try
VBA Code:
ActiveSheet.Range("A1:AV1").AutoFilter 6, "<>1110", xlAnd, "<>2220"
You can only use an array if it's an exact match
thanks fluff. I tried that and it says that field six is filtered but nothing is selected. I just want it to deselect 1110 and 2220. This seems to be deselecting all numbers in field six, even though it says its filtered nothing is selected, there should be several numbers selected. Any ideas?
 
Upvote 0
The code doesn't select or deselect anything, it just hides rows that equal 1110 or 2220 in col F
 
Upvote 0
Are they actually numbers?
 
Upvote 0
Change the format to number with 2 decimal spaces, what do you see?
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,849
Members
449,096
Latest member
Erald

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