I'm trying to copy the results of an autofilter, with the code below but keep getting a run-time error '1004': Unable to get the SpecialCells property of the Range class.
How do i fix that? thanks!
How do i fix that? thanks!
Code:
Dim LR As Long
Dim rng As Range
With Sheet1
AutoFilterMode = False
LR = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range("A:N").AutoFilter Field:=5, Criteria1:="<=50", Operator:=xlAnd
Set rng = .Range("A1:N" & LR).SpecialCells(xlcelltypevisable)
rng.AutoFilter.Copy Sheet23.Range("A1")
End With
Last edited: