aswathy0001
New member
i am using this code for move the entire row if column H had the value "Duplicate" i had more than 10000 total records but very few had "Duplicate" in H column. so its take time because each record in if loop. only few records having the value duplicate in H column. is that any other solution to make it fast?
Code:
Sub MoveDuplicate2()Application.ScreenUpdating = False
Dim i As Integer
Dim acount
acount = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To acount
If Range("H" & i).Value = "Duplicate" Then
Range("A" & i).Select
ActiveCell.EntireRow.Cut
Sheets("Duplicate").Select
Sheets("Duplicate").Range("A65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Complete_List").Select
ActiveCell.EntireRow.Delete Shift:=xlUp
i = i - 1
End If
Next i
i = i + 1
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub