Remove Duplicate

vijaychennai

Board Regular
Joined
Dec 7, 2009
Messages
239
Remove Duplicate


Hi all,

I have excel file in the below format.

Excel Workbook
AB
1NameDate
2a2/18/2010
3a2/19/2010
4a2/19/2010
5a2/19/2010
6a2/19/2010
7a2/19/2010
8a2/19/2010
9a2/19/2010
10a2/19/2010
11b2/16/2010
12b2/18/2010
13b2/18/2010
14b2/18/2010
15c2/18/2010
16c2/18/2010
17c2/15/2010
18c2/18/2010
19c2/18/2010
20d2/10/2010
21d2/18/2010
22d2/18/2010
Sheet1




I want to remove the duplicate based on the date.

i want to take the first date .

Answer :

Excel Workbook
EF
1NameDate
2a2/18/2010
3b2/16/2010
4c2/15/2010
5d2/10/2010
Sheet1
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Sort by Name then Date.

In c2

=COUNTIF($A$2:A2,A2)

and fill down

filter for values > 1

then delete
 
Upvote 0
Try

Code:
Sub DelDup()
Dim LR As Long, i As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = LR To 3 Step -1
    With Range("A" & i)
        If .Value = .Offset(-1).Value Then .EntireRow.Delete
    End With
Next i
End Sub
 
Upvote 0

Forum statistics

Threads
1,221,470
Messages
6,160,029
Members
451,611
Latest member
PattiButche

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top