"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.