I am trying to apply a filter to a record set. I have a column which contains data in the format
000000000000
001001000010
F02433101010
BB0001103000
BBB34F000000
342100100000
312101100000
001230000000
512222300010
BB2221113010
5BB342300000
6B2231000000
BB0234440000
What I need to do is show only the records which contain F, B, 3, 4, 5, or 6.
What I have tried.
varArray = Array("=*F*", "=*B*", "=*3*", "=*4*", "=*5*", "=*6*")
ActiveSheet.Range("$A$1:$P$63355").AutoFilter Field:=6, Criteria1:=Application.Transpose(varArray), Operator:=xlFilter
This does not give me the correct results. If I use the following I get the correct results with the exception it does not show me the values which contain 3, 4, 5, or 6.
ActiveSheet.Range("$A$1:$P$63355").AutoFilter Field:=6, Criteria1:="=*F*", Operator:=xlOr, Criteria2:="=*B*"
I think the xlFilter is using and instead of or which gives an incorrect result. Any idea's how to solve this?
Mark Perrigon
Cyber Corp Software
http://www.cybercorpsoftware.com
Bookmarks