michelleponan
Member
Hi,
Does anyone can help me make my macros run fast.
It used to function fast but as more and more info is coming, it's taking me ages
to wait before it finished.
Thanks.
Does anyone can help me make my macros run fast.
It used to function fast but as more and more info is coming, it's taking me ages
to wait before it finished.
Thanks.
Code:
Sub Delete_Dups_Keep_Last()
Dim i As Long
Dim j As Long
Dim ROW_DELETED As Boolean
i = 1 'start on first row
Worksheets("DRAWINGS (submitted to LTA)").Range("A1:O3500").Copy Destination:=Worksheets("Summary").Range("a1")
Application.ScreenUpdating = False
Do While i <= ActiveSheet.UsedRange.Rows.Count
ROW_DELETED = False
For j = i + 1 To ActiveSheet.UsedRange.Rows.Count
If Cells(i, 10) = Cells(j, 10) Then
Rows(i).Delete
ROW_DELETED = True
Exit For
End If
Next j
If Not ROW_DELETED Then i = i + 1
Loop
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: