Sub test()
Application.ScreenUpdating = False
N = 0
For r = [A65536].End(xlUp).Row To 1 Step -1
V = Cells(r, 1).Value
If Application.WorksheetFunction.CountIf(Columns(1), V) > 1 Then
Rows(r).EntireRow.Delete
N = N + 1
End If
Next r
Application.ScreenUpdating = True
End Sub
先排序,再运行上面的宏就可以了,如果是其他格式,可先导入excel