السلام عليكم
استعمل هذا الكود
Private Sub CommandButton1_Click()
Dim i As Long
Set MySheet = Sheets("Sheet1")
With MySheet
Last = .Cells(Rows.Count, "A").End(xlUp).Row + 1
Application.ScreenUpdating = False
For i = .Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
If WorksheetFunction.CountIf(.Range("A2:A" & i), .Range("A" & i).Value) > 1 Then
Rows(i & ":" & i).Delete Shift:=xlUp
End If
Next i
Application.ScreenUpdating = True
End With
End Sub