Excel unique data rows
Solved/Closed
Related:
- Excel unique data rows
- How to copy data from one excel sheet to another - Guide
- Export data from excel - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Excel move data from one sheet to another - Guide
- Tmobile data check - Guide
3 responses
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
22 Jun 2010 à 18:59
22 Jun 2010 à 18:59
Could you please upload a sample file with sample data etc on some shared site like https://authentification.site , http://wikisend.com/ ,https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://docs.google.com/&followup=https://docs.google.com/&emr=1 http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
28 Jun 2010 à 17:50
28 Jun 2010 à 17:50
Try this
Sub KeepLatestData()
Dim lMaxRows As Long
lMaxRows = Cells(Rows.Count, "A").End(xlUp).Row
Range("A2:D" & lMaxRows).Sort _
Key1:=Range("A3"), Order1:=xlAscending, _
Key2:=Range("B3"), Order2:=xlDescending, _
Header:=xlYes
Do While lMaxRows > 2
If (Cells(lMaxRows, "A") = Cells(lMaxRows - 1, "A")) Then
If (Format(CDate(Cells(lMaxRows, "B")), "YYYYMMDD") = Format(CDate(Cells(lMaxRows - 1, "B")), "YYYYMMDD")) Then
If (CDate(Cells(lMaxRows, "B")) < CDate(Cells(lMaxRows - 1, "B"))) Then
Rows(lMaxRows).Delete
End If
End If
End If
lMaxRows = lMaxRows - 1
Loop
End Sub
24 Jun 2010 à 09:05
alice cooper 5/12/10 6:15 AM
howdy doody 7/14/09 9:00 AM*
howdy doody 7/14/09 9:07 AM
jane doe 6/30/09 12:00 AM*
jane doe 6/30/09 12:45 AM
jane doe 4/15/10 11:00 AM
john doe 4/10/10 12:31 AM
kevin brown 1/21/10 4:30 PM*
kevin brown 1/21/10 4:35 PM*
kevin brown 1/21/10 5:00 PM
mark doe 3/31/10 9:00 AM
sally doe 4/10/10 2:00 PM
sally fields 6/13/10 10:00 AM
What I'm trying to do is remove instances of duplicate records that occurr on the same day, where for example, the name and date are the same but keeping the instance where the time is the most recent. See asterix (these are the ones I would want to be removed)
I know this can be done somewhat through conditional formating and a sort/filter, but still some sifting though will still have to be done. Hoping that maybe it could be automated somehow to make for a quicker process. I have a large list of records (100,000+).
24 Jun 2010 à 18:39
25 Jun 2010 à 09:06
http://www.editgrid.com/user/care/quiz2
25 Jun 2010 à 09:09
Here's the link to the workbook.
http://www.editgrid.com/user/care/quiz2
Thanks.
25 Jun 2010 à 15:37
1. Can data be sorted.
2. Can rows be delete
and bonus question
3 Would a macro work for you