I have a spreadsheet with 3 columns: Usercode, Date Accessed and Time Accessed. The major sort is Usercode and then a minor sort by Date Accessed and then Time Accessed. I need a macro that will remove all of the duplicate Date Accessed for each unique Usercode and the remaining Date Accessed should be the one with the earliest Time Accessed for that particular day. It would do this for each unique Usercode so each Usercode may have the same values for Date Accessed but for each unique Usercode there would only be unique values for Date Accessed which would be the one with the earliest Time Accessed for that particular day . For instance, in my example below, I would need the macro to remove Rows A, D, F, H and I. If it helps, the original format for Date Accessed is 1/8/2018 9:47:33 AM in one cell but then I just used a formula to split the two to read 1/8/2018 and 9:47 AM into two separate cells. Any help would be much appreciated.
Row Usercode Date Accessed Time Accessed
A AB 1/8/2018 9:47 AM
B AB 1/8/2018 9:21 AM
C AB 1/4/2018 11:05 AM
D AB 1/3/2018 11:14 AM
E AB 1/3/2018 11:00 AM
F CD 1/8/2018 1:33 PM
G CD 1/8/2018 9:11 AM
H CD 1/5/2018 4:16 PM
I CD 1/5/2018 2:03 PM
J CD 1/5/2018 9:04 AM
Row Usercode Date Accessed Time Accessed
A AB 1/8/2018 9:47 AM
B AB 1/8/2018 9:21 AM
C AB 1/4/2018 11:05 AM
D AB 1/3/2018 11:14 AM
E AB 1/3/2018 11:00 AM
F CD 1/8/2018 1:33 PM
G CD 1/8/2018 9:11 AM
H CD 1/5/2018 4:16 PM
I CD 1/5/2018 2:03 PM
J CD 1/5/2018 9:04 AM