|
Sub demo()
Dim x, lastrow
Dim d As Object
Set d = CreateObject("scripting.dictionary")
ActiveSheet.AutoFilterMode = fasle
rr = Array([ar3], [ar4], [ar5])
For i = 0 To UBound(rr)
d(Trim(rr(i))) = ""
Next i
lastrow = Cells(Rows.Count, "CL").End(xlUp).Row
ReDim brr(1 To lastrow - 12, 1 To 1)
For x = 13 To lastrow
If Not d.exists(Trim(Cells(x, "cl"))) Then
n = n + 1
brr(n, 1) = Cells(x, "cl")
End If
Next x
zd = Application.Max(Application.Index(brr, 0, 1))
ActiveSheet.Range("$A$13:$CM$" & lastrow).AutoFilter Field:=90, Criteria1:=zd, Operator:=xlAnd
End Sub
|
|