Hi,
Why do I get a break "Autofilter method of range class failed" with this? Where's the error?
![]()
Dim Lastrow As Long Range("B:B").AutoFilter Field:=2, Criteria1:="=" > "&’Data’!$M$20", Operator:=xlOr, Criteria2:="=" < "&’Data’!$M$19" Lastrow = Range("B" & Rows.Count).End(xlUp).Row If Lastrow > 2 Then Range("A2:A" & Lastrow).SpecialCells(xlCellTypeVisible).EntireRow.DELETE xlShiftUp ActiveSheet.AutoFilterMode = False
Bookmarks