I found this on the web quite a few years ago and it works for me (probably
from Chip Pearson's site but I cannot say for sure).
-ryanb.-
Paste this in a macro, then select the first cell in the column of computer
names and run it.
Sub DeleteDuplicates()
'
' This macro deletes duplicate rows in the selection. Duplicates are
' counted in the COLUMN of the active cell. Select the first row of
' the column with duplicate numbers and then run the macro.
Dim Col As Integer
Dim R As Long
Dim C As Range
Dim N As Long
Dim V As Variant
Dim Rng As Range
On Error GoTo EndMacro
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Col = ActiveCell.Column
If Selection.Rows.Count > 1 Then
Set Rng = Selection
Else
Set Rng = ActiveSheet.UsedRange.Rows
End If
N = 0
For R = Rng.Rows.Count To 1 Step -1
V = Rng.Cells(R, 1).Value
If Application.WorksheetFunction.CountIf(Rng.Columns(1), V) > 1 Then
Rng.Rows(R).EntireRow.Delete
N = N + 1
End If
Next R
EndMacro:
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
HTH