Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
removing duplicate entries
hi, I'm trying to remove duplicate entries from a list of names & addresses. what I'm after is some VBA code which will examine row by row the 'post code' field and the 'Full name' field and highlight/delete duplicate entries. its best illustrated by an example FULL NAME ADDRESS POSTCODE Mr C. Verougstraete 6 somone st, Leicester HY8 9YK Mrs R. Brazier 8 high st HY9 9LK Mr C. Verougstraete 6 somone st, HY8 9YK the last record is obviously a duplicate of row 2 therefore will be removed any help greatly appreciated thanks -- armagan ------------------------------------------------------------------------ armagan's Profile: http://www.excelforum.com/member.php...o&userid=34237 View this thread: http://www.excelforum.com/showthread...hreadid=551068 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
removing duplicate entries
Sub ClearData()
Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = iLastRow To 1 Step -1 If Application.CountIf(Columns(1), Cells(i, "A").Value) 1 Then Rows(i).Delete End If Next i End Sub -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "armagan" wrote in message ... hi, I'm trying to remove duplicate entries from a list of names & addresses. what I'm after is some VBA code which will examine row by row the 'post code' field and the 'Full name' field and highlight/delete duplicate entries. its best illustrated by an example FULL NAME ADDRESS POSTCODE Mr C. Verougstraete 6 somone st, Leicester HY8 9YK Mrs R. Brazier 8 high st HY9 9LK Mr C. Verougstraete 6 somone st, HY8 9YK the last record is obviously a duplicate of row 2 therefore will be removed any help greatly appreciated thanks -- armagan ------------------------------------------------------------------------ armagan's Profile: http://www.excelforum.com/member.php...o&userid=34237 View this thread: http://www.excelforum.com/showthread...hreadid=551068 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Removing duplicate entries. | Excel Discussion (Misc queries) | |||
How can you identify duplicate entries in a singe column? | Excel Worksheet Functions | |||
Duplicate Entries | Excel Discussion (Misc queries) | |||
Need help with finding duplicate entries | Excel Worksheet Functions | |||
count duplicate (or, inversely, unique) entries, but based on a condition | Excel Worksheet Functions |