Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete duplicate rows of data
Hi,
I tried to delete duplicate rows of data in column J and yet not response Actually, my intention is to delete the first row if duplicated rows found something has gone wrong with the codes below which I shared the codes from excel forum Sub RemoveDups() Dim r As Long, c As Long, t As Long r = Cells(Rows.Count, 10).End(xlUp).Row On Error Resume Next For c = r To 2 Step -1 Range(Cells(1, 00), Cells(c - 1, 10)).Select t = Selection. Find(What:=Cells(c, 10), After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Row If t 0 And t < c Then Rows(t).EntireRow.Delete Next c On Error Goto 0 End Sub Can someone assist me to solve the above problem ? Thanks in advance Regards Len |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete duplicate rows, keep one | Excel Discussion (Misc queries) | |||
macro to delete rows below the first row with duplicate data | Excel Programming | |||
VBA to delete Duplicate Records (1 column), before which, non-duplicate data merged into remaining row | Excel Programming | |||
Delete duplicate rows | Excel Programming | |||
delete duplicate rows | Excel Programming |