Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteDups()
Dim i as long Dim rng as Range set rng = Cells(rows.count,1).End(xlup) for i = rng.row to 2 step -1 if cells(i,1).Value = cells(i-1,1).Value and _ cells(i,2).Value = cells(i-1,2).Value then cells(i,1).EntireRow.Delete End if Next Next -- Regards, Tom Ogilvy Richard Leclezio wrote in message ... What code must I write to delete duplicate rows in an excel spreadsheet. Eg: Name Age rich 25 rich 25 rich 25 linda 30 linda 30 linda 30 result: rich 25 linda 30 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting duplicate names | Excel Discussion (Misc queries) | |||
Deleting duplicate row | Excel Discussion (Misc queries) | |||
Deleting duplicate rows | Excel Discussion (Misc queries) | |||
deleting duplicate names | Excel Discussion (Misc queries) | |||
Deleting unused lines between used lines? | Setting up and Configuration of Excel |