ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problems with AutoFilter macro (https://www.excelbanter.com/excel-programming/449815-problems-autofilter-macro.html)

[email protected]

Problems with AutoFilter macro
 
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.

Claus Busch

Problems with AutoFilter macro
 
Hi,

Am Fri, 14 Feb 2014 05:34:47 -0800 (PST) schrieb :

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.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

[email protected]

Problems with AutoFilter macro
 
W dniu piątek, 14 lutego 2014 14:34:47 UTC+1 użytkownik 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 say which i dont want), Operator:=xlFilterValues

End Sub









Thanks for any help

Jena C.


WOW ! THANK YOU Claus :)!!!!


All times are GMT +1. The time now is 04:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com