Originally Posted by
david2020
(New Member and first reply to a thread)
Do you know of a way of Deleting duplicate records, using Excel 2003.
The raw data is in the form of a text string. For example:
Vehicle 123456_F_AB 280
Vehicle 123456_R_AB 147
So when I do a count of these cells, I obtain a count of 2. '=Count(A1)'. How can I easily exclude 1 of the duplicates (123456). It needs to be a user friendly solution as other people may have to run this when I'm on leave? Thanks in advance if you know the answer.
Regards
David R.
David, try this:
Sub DeleteDuplicates()
Dim i As Integer
Dim j as Integer
i = 3
j = 1
Do
If Cells(i, j) = Cells(i - 1, j) Then
Rows(i).Select
Selection.Delete
i = i - 1
End If
i = i + 1
Loop Until Cells(i, j) = ""
End Sub
Bookmarks