"Remove dublicate values with constraints"

New Contributor


I have list with a lot of dublicated values. I want to delete one of the dublicated rows, but it should be the one with the earlist LogOn (in this case the second row). Is it possible to do this by a command or using VBA?




Hope for the best (crossed fingers - the list consist of 25.000+ dublicated values).

2 Replies

If duplicates are for first two columns you could do that manually

1) Data-Sort, first two levels to sort are first two columns; third level are dates with Oldest to newest order

2) Select your entire range/sheet, Data->Remove duplicates; keep selected only first two columns; Enter


Remove duplicates keeps only first met row with duplicates, thus with oldest row.


If for some reason you'd like to return to initial order of rows, add helper column before sorting with index from 1 to number of rows in the range. After removing duplicates sort by that column and remove it.

Thank you, Sergei. It worked.

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
W10-1903 UNC path failing 0x80070043
kurgan in Windows Insider Program on
80 Replies