Some remarks.
lRow always result in 1 since A1 is top row.Code:lrow = ActiveSheet.Range("a1").End(xlUp).Row
AllCells always result in 1 cell value being A1 value.Code:Set AllCells = Range("A1:A" & lrow)
Autofilter will therefore filter on 1 value only and the For...Next loop has no added value.
Avoid using Select and Selection in code because this is really unnecessary. Instead use With...End With statement.




Reply With Quote
Bookmarks