LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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


 
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 05:58 PM.

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"