GAILBAKER
asked on
EXCEL 2013 FILTER MULTIPLE NOT EQUAL TO CRITERIA
Hi
See the attached file.
I am trying to write a Macro to:
Filter to display rows where IF NOT EQUAL to the following in Column D: TKT, HTL, CAR, SFE
Other data in the D column may vary.
I wrote this but it didn't work!!!:
Application.Goto Reference:="Sheet1'!R1C1"
Selection.AutoFilter
ActiveSheet.Range("$A$1:$Z $5000").Au toFilter Field:=4, Criteria1:= _
"<>TKT", Operator:=xlAnd, Criteria2:="<>HTL", Operator:=xlAnd, Criteria3:="<>CAR", Operator:=xlAnd, Criteria4:="<>SFE"
Gratefully,
Gail (in Australia)
See the attached file.
I am trying to write a Macro to:
Filter to display rows where IF NOT EQUAL to the following in Column D: TKT, HTL, CAR, SFE
Other data in the D column may vary.
I wrote this but it didn't work!!!:
Application.Goto Reference:="Sheet1'!R1C1"
Selection.AutoFilter
ActiveSheet.Range("$A$1:$Z
"<>TKT", Operator:=xlAnd, Criteria2:="<>HTL", Operator:=xlAnd, Criteria3:="<>CAR", Operator:=xlAnd, Criteria4:="<>SFE"
Gratefully,
Gail (in Australia)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How crazy is that????!!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That is extremely clever Glenn - many thanks for taking the trouble to work it out.
I have actually made a workaround which was to copy the D column to F column, then execute a filter for TKT and HTL in F column, and then execute a filter for CAR and SFE in D column.
A very amateur method, but it worked!!
I will give you the points for your solution, cheers, Gail
I have actually made a workaround which was to copy the D column to F column, then execute a filter for TKT and HTL in F column, and then execute a filter for CAR and SFE in D column.
A very amateur method, but it worked!!
I will give you the points for your solution, cheers, Gail
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for GAILBAKER's comment #a40192781
for the following reason:
Very clever and lateral thinking
Accepted answer: 0 points for GAILBAKER's comment #a40192781
for the following reason:
Very clever and lateral thinking
Hi Glenn,
nice little script you wrote there! Very helpfull, even after two years.
Thanks :-)
nice little script you wrote there! Very helpfull, even after two years.
Thanks :-)
ASKER