[VBA ] AutoFilter筛选多个值

楼主: chris75123 (123)   2015-07-09 18:52:41
各位大大好,
小弟最近刚学用VBA,
遇到一个问题想要请问:
想要筛选出非ant开头、非balloon开头、不包含cat字眼的值,
但是遇到以下问题,求解~
=============================================================================
1.
ActiveSheet.Range("$B$5:$K$20000").AutoFilter Field:=2, Criteria1:=Array( _
"<>ant*", "<>balloon*", "<>*cat*"), Operator:=xlAnd
=> 只会筛选不包含cat字眼的值
=============================================================================
2.
ActiveSheet.Range("$B$5:$K$20000").AutoFilter Field:=2, Criteria1:=Array( _
"<>ant*", "<>balloon*", "*cat*"), Operator:=xlFilterValues
=> Class Range的AutoFilter 方法失败
=============================================================================
3.
ActiveSheet.Range("$B$5:$K$20000").AutoFilter Field:=2, Criteria1:= _
"<>ant*", Operator:=xlAnd, Criteria2:= "<>balloon*"
=> 只能筛选两个值
=============================================================================
谢谢
作者: johnpage (johnpage)   2015-07-09 19:53:00
筛完后再筛
楼主: chris75123 (123)   2015-07-14 14:55:00
请问要如何筛完再筛? 筛第二次就会只套用第二次的结果

Links booklink

Contact Us: admin [ a t ] ucptt.com