LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
woodlot4
 
Posts: n/a
Default


I think this is what I have been searching for. I need to delete
duplicate addresses out of a list of thousands. This sounds like it
will work but I have no clue how to write and then apply a macro to do
it. How do I take the details below and apply it to my workbook?
woodlot4atyahoo.com

dominicb Wrote:
Good afternoon Adam a

The code listed below will do the trick for you. It will hide all rows
containing duplicate information, so you don't lose the information - it
just removes it from view. However feel free to alter it to delete the
rows completely if you wish.

Sub HideDuplicate()
On Error Resume Next
Set UsrRng = Selection
For Each UsrCel In UsrRng
Dupd = UsrCel.Address
Dupd = UsrRng.Find(What:=UsrCel, After:=UsrCel, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Address
If Dupd < UsrCel.Address Then UsrCel.EntireRow.Hidden = True
Next UsrCel
End Sub


To use this highlight just one column that contains the duplicate
information and then run the macro.

HTH

DominicB



--
woodlot4
------------------------------------------------------------------------
woodlot4's Profile: http://www.excelforum.com/member.php...o&userid=26613
View this thread: http://www.excelforum.com/showthread...hreadid=384161

 
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 records in excel, how to do it? Don Excel Discussion (Misc queries) 3 July 27th 05 01:45 AM
Deleting specific records [email protected] Excel Discussion (Misc queries) 6 June 22nd 05 11:35 PM
Macro - to copy duplicate rows to another sheet [email protected] Excel Worksheet Functions 2 April 19th 05 01:53 AM
deleting duplicate records in a mail merge Mimi Excel Discussion (Misc queries) 1 April 7th 05 05:55 PM
Duplicate records in Excel Sheidsa Excel Discussion (Misc queries) 1 November 30th 04 12:23 AM


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

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

About Us

"It's about Microsoft Excel"