我使用以下代码使用超过3个条件自动过滤列 - 但是,它说“范围类的自动过滤方法失败”
此代码似乎正在处理另一个SO帖子。
有人可以帮忙吗?
由于
Public Sub autofilter2()
Dim ws As Worksheet
Dim wsOut As Worksheet
Dim a As String
Dim b As String
Dim c As String
Set ws = Worksheets("Raw Data")
'AutoFilterMode = False
a = Cells(69, 6).Value
b = Cells(69, 7).Value
c = Cells(69, 8).Value
ws.Range("A:bk").autofilter field:=64, _
Criteria1:=Array(a, b, c), _
Operator:=xlFilterValues
End Sub
答案 0 :(得分:2)
64 超出了列 BK 。你可以拥有的最大值是 63