VBA Stuck after certain loop

Hi Please find the below code , This is working fine at my end.

Sub so()
lRow = ThisWorkbook.ActiveSheet.Cells(Rows.Count, 4).End(xlUp).Row
lRow1 = ThisWorkbook.ActiveSheet.Cells(Rows.Count, 2).End(xlUp).Row
ThisWorkbook.ActiveSheet.Range("E1").AutoFilter Field:=2, Criteria1:=""
ThisWorkbook.ActiveSheet.Range("D1:D" & lRow).SpecialCells(xlCellTypeVisible).Copy       Range("J1")
ThisWorkbook.ActiveSheet.Range("B1:B" & lRow1).SpecialCells(xlCellTypeVisible).Copy Range("K1")
Selection.AutoFilter
End Sub

Leave a Comment