Problems with AutoFilter macro

T

twooclarkson

Hello i would like to make Auto Filter Macro which will always remove "0" and word "test" and will leave rest of things.


I dont want to write all Criterial "numbers like 5,6,3,17, because that things will grow endless, just always Remove "0" and "test" word from Filter.


(Tabele 1)
1
2
3
4
0
5
6
7
892
11
18
0
18
221
3
43
0
54
6
71
test
11
18
202
18
221
404
1223


---------------------------------------------------------------------------

Sub Elipse()

'
ActiveSheet.Range("$E$10:$F$21").AutoFilter Field:=2, Criteria1:=Array("1", _
"2", "3", "4" ... dont want to write here tons of things just say which i dont want), Operator:=xlFilterValues
End Sub




Thanks for any help
Jena C.
 
C

Claus Busch

Hi,

Am Fri, 14 Feb 2014 05:34:47 -0800 (PST) schrieb (e-mail address removed):
Hello i would like to make Auto Filter Macro which will always remove "0" and word "test" and will leave rest of things.
ActiveSheet.Range("$E$10:$F$21").AutoFilter Field:=2, Criteria1:=Array("1", _
"2", "3", "4" ... dont want to write here tons of things just say which i dont want), Operator:=xlFilterValues
End Sub

try:

ActiveSheet.Range("$E$10:$F$50").AutoFilter Field:=2, Criteria1:="<>0",
_
Operator:=xlAnd, Criteria2:="<>test"


Regards
Claus B.
 
T

twooclarkson

W dniu piątek, 14 lutego 2014 14:34:47 UTC+1 użytkownik (e-mail address removed) napisał:
Hello i would like to make Auto Filter Macro which will always remove "0"and word "test" and will leave rest of things.





I dont want to write all Criterial "numbers like 5,6,3,17, because that things will grow endless, just always Remove "0" and "test" word from Filter..





(Tabele 1)

1

2

3

4

0

5

6

7

892

11

18

0

18

221

3

43

0

54

6

71

test

11

18

202

18

221

404

1223





---------------------------------------------------------------------------



Sub Elipse()



'

ActiveSheet.Range("$E$10:$F$21").AutoFilter Field:=2, Criteria1:=Array("1", _

"2", "3", "4" ... dont want to write here tons of things just saywhich i dont want), Operator:=xlFilterValues

End Sub









Thanks for any help

Jena C.

WOW ! THANK YOU Claus :)!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top