Thread: duplicate
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default duplicate

Should do it

Sub nodupesincolbandcolc()
lr = Cells(Rows.Count, 1).End(xlUp).Row
On Error Resume Next
For i = 2 To lr
With Range(Cells(2, 2), Cells(lr, 3))
' Set c = .Find(Cells(i, 1), LookIn:=xlValues)
Set c = .Find(Cells(i, 1), LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False)


If Not c Is Nothing Then
firstAddress = c.Address
Do
' MsgBox c.Row & " " & c.Column
c.ClearContents
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Matt" wrote in message
...
I have three columns A,B,C, each represents a month July, Aug, Sep. Each
column shows the start date of the client; however, their ID# carries over
the the next month. EX;
July Aug Sep
shp0053 shp0026 shp0026
shp0067 shp0053 shp0053
shp0181 shp0067 shp0067
shp0234 shp0181 shp0181
shp0521 shp0234 shp0234 What formula do I use to get rid of
the
duplicates in column B, and C, but not A? the list is 400 lines long
please
help.