#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 516
Default duplicate

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
duplicate amie etincelle Excel Discussion (Misc queries) 1 May 23rd 08 05:56 PM
duplicate name help please Terry Excel Worksheet Functions 9 February 20th 08 03:52 PM
How do you delete duplicate addresses, but keep duplicate names? Shelly Excel Discussion (Misc queries) 1 August 28th 06 10:36 PM
duplicate Metalteck Excel Discussion (Misc queries) 2 May 11th 05 10:04 PM
Duplicate Bottle Excel Worksheet Functions 3 April 14th 05 04:57 PM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"