This looping has no problem if I have under 100 rows in the looping table sheet. However, If it go over 100 rows, looping takes a while to filtering and paste value in looping sheet. Is there any way to optimize this VBA code to run faster?Sub Testingloop()Dim endrown As StringDim ex As StringDim ez As StringDim eh As StringDim eg As StringDim el As StringDim ee As StringDim es As StringDim ef As StringDim ei As StringDim i As IntegerDim LastRowColumnA As Long: LastRowColumnA = Sheets(looping).Cells(Rows.Count, 1).End(xlUp).RowApplication.ScreenUpdating = FalseSheets(looping table).Selectendrown = Sheets(looping table).Range(I1000).End(xlUp).Row    For i = 3 To endrown        ee= Cells(i, 9).Value        ex= Cells(i, 10).Value        ez= Cells(i, 11).Value        es = Cells(i, 12).Value        ef = Cells(i, 13).Value        ei = Cells(i, 14).Value         eh = Cells(i, 15).Value        eg= Cells(i, 16)        el= Cells(i, 17)        Sheets(looping).Select             ActiveSheet.UsedRange.AutoFilter Field:=1, Criteria1:=ee             ActiveSheet.UsedRange.AutoFilter Field:=2, Criteria1:=ex             ActiveSheet.UsedRange.AutoFilter Field:=3, Criteria1:=ez            ActiveSheet.UsedRange.AutoFilter Field:=4, Criteria1:=es            ActiveSheet.UsedRange.AutoFilter Field:=5, Criteria1:=ef              ActiveSheet.UsedRange.AutoFilter Field:=6, Criteria1:=ei            ActiveSheet.UsedRange.AutoFilter Field:=7, Criteria1:=eh        On Error Resume Next        Range(H2:H & LastRowColumnA).SpecialCells(xlCellTypeVisible).Value = eg        Range(I2:I & LastRowColumnA).SpecialCells(xlCellTypeVisible).Value = el            ActiveSheet.ShowAllData                Sheets(looping table).Select                   Next iEnd Sub
how to optimize vba looping code using variables?
performance;vba