Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
armagan
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default 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
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
Removing duplicate entries. dh01uk Excel Discussion (Misc queries) 2 January 13th 06 03:51 PM
How can you identify duplicate entries in a singe column? Melissa Excel Worksheet Functions 3 January 4th 06 09:20 PM
Duplicate Entries ConfusedNHouston Excel Discussion (Misc queries) 1 November 1st 05 12:50 PM
Need help with finding duplicate entries Phil Excel Worksheet Functions 6 October 20th 05 03:56 AM
count duplicate (or, inversely, unique) entries, but based on a condition markx Excel Worksheet Functions 3 March 8th 05 06:57 PM


All times are GMT +1. The time now is 05:09 AM.

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"