I have attempted to create a macro which scan cells from column D to find duplicates and move the row where the 'second' duplicate is found (i.e. the one with the highest row number) to first empty row, i.e. right at the bottom of the list.
As an example, the worksheet has no more than 100 rows, the macro starts to look for the value in D1 and compare it to D2, if the values are the same, then row 2 is moved down to row 100. So on so forth for the remaining cells in column D until a blank row is met, then the macro simply deletes all empty row.
Here is a sample of the code I have been using:
The macro runs however it does not provide a consistent outcome according to the source data I use. For example the macro moves rows to the bottom of even if there are no duplicates.
Any help would be appreciated.
Thanks,
Antoine
Bookmarks