Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Deleting duplicate records

I am combining contact records from 2 different xls worksheets and need to
delete the duplicates. I need to know how to -
1. identify the duplicates [Assuming column A contains last name and column
B first name, I have done this through =IF((A2=A1)*(B2=B1), "duplicate", "")
but dont know if there is a better way :-)]
2. tranfer any missing information from duplicate to the reference record
[additional information in columns C-Z]
3. Delete the duplicate record

Thank you!


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default Deleting duplicate records

Check out the advanced filter - DataFilterAdvanced Filter. There is
the option to copy unique records to another range.

Cliff Edwards

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default Deleting duplicate records

you can use COUNTIF Function for example =countif(B:B,B1)

OR you will also use this macros

Sub FindRepeatedValues()
ac = Application.Calculation
Application.Calculation = xlCalculationManual
mb = MsgBox("Finding repeated values - Press Yes to highlight, No
to delete", vbYesNoCancel)
If mb = 2 Then Exit Sub
r = Selection.Row
c = Selection.Column
rr = Selection.Rows.Count - 1
cc = Selection.Columns.Count - 1
i = -1
Do While rr 0
i = i + 1
If Cells(r + i, c).Value = Cells(r + i + 1, c).Value Then
If mb = 6 Then
With Range(Cells(r + i + 1, c), Cells(r + i + 1, c +
cc)).Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Else
Range(Cells(r + i + 1, c), Cells(r + i + 1, c +
cc)).Delete shift:=xlUp
i = i - 1
End If
End If
rr = rr - 1
Loop
Application.Calculation = ac
End Sub

Hope this will help u

cheers
Hardeep kanwar

"ward376" wrote:

Check out the advanced filter - DataFilterAdvanced Filter. There is
the option to copy unique records to another range.

Cliff Edwards


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
Deleting Duplicate Records across multiple sheets saschmeling Excel Worksheet Functions 1 May 29th 08 03:55 PM
How do I display duplicate records in Excel without deleting? jkc1 Excel Worksheet Functions 1 August 23rd 06 07:18 PM
Deleting duplicate records Keensie Excel Discussion (Misc queries) 1 April 21st 06 08:12 PM
Deleting both duplicate records ruth_austin50 Excel Discussion (Misc queries) 1 June 22nd 05 05:06 PM
deleting duplicate records in a mail merge Mimi Excel Discussion (Misc queries) 1 April 7th 05 05:55 PM


All times are GMT +1. The time now is 09:08 PM.

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"