使用逻辑运算符在超过2个条件上使用自动过滤器

问题描述 投票:0回答:1

我试过这个,但我的代码返回运行时错误1004. Use autofilter on more than 2 criteria

逻辑运算符是否与此有关?

.AutoFilter Field:=1, Criteria1:=Array("<>*string1*", "<>*string2*", "<>*string3*"), Operator:=xlFilterValues
excel vba excel-vba autofilter
1个回答
0
投票

难道你不能只创建一个Filter列并在其中放入一个if语句吗?像下面的formulsa,然后只是过滤该列

=IFERROR(FIND("string1",UPPER(C9)),0)+IFERROR(FIND("string2",UPPER(C9)),0)+IFERROR(FIND("string2",UPPER(C9)),0)
© www.soinside.com 2019 - 2024. All rights reserved.