jamesexcel1970
Member
Hello
I have attatched excel file with code which contains dummy data of course.
1) what i wanted is from A column wanted to filter starting with "A" and "B" filter which is working fine.
ActiveSheet.Range("$A$1:$C$9").AutoFilter Field:=1, Criteria1:="=a*", _
Operator:=xlOr, Criteria2:="=b*"
2) From Second column i wanted to filter with 100 which is also working fine.
ActiveSheet.Range("$A$1:$C$9").AutoFilter Field:=2, Criteria1:="=100"
3)from third column wanted to filter wanted to filter "a160" which is a code.
ActiveSheet.Range("$A$1:$C$9").AutoFilter Field:=2, Criteria1:="=a160"
Which is not existing in the list and wanted to ignore.
Problem is 1st and 2nd point working but in 3rd case as criteria a160 is not available it should ignore but result is show all blank rows.
when you dont find a value it should show the results of first and second filer atleast by ignoring third filter as it is not available.
Hope my request is clear.
Cheers!
I have attatched excel file with code which contains dummy data of course.
1) what i wanted is from A column wanted to filter starting with "A" and "B" filter which is working fine.
ActiveSheet.Range("$A$1:$C$9").AutoFilter Field:=1, Criteria1:="=a*", _
Operator:=xlOr, Criteria2:="=b*"
2) From Second column i wanted to filter with 100 which is also working fine.
ActiveSheet.Range("$A$1:$C$9").AutoFilter Field:=2, Criteria1:="=100"
3)from third column wanted to filter wanted to filter "a160" which is a code.
ActiveSheet.Range("$A$1:$C$9").AutoFilter Field:=2, Criteria1:="=a160"
Which is not existing in the list and wanted to ignore.
Problem is 1st and 2nd point working but in 3rd case as criteria a160 is not available it should ignore but result is show all blank rows.
when you dont find a value it should show the results of first and second filer atleast by ignoring third filter as it is not available.
Hope my request is clear.
Cheers!
Attachments
Last edited: