On my computer, my code executes in 0.02 seconds on average where as Rajan's executes in 0.03 seconds on average... the code you posted executes in 0.03 seconds on average; HOWEVER the list your code produces is not the same as the list Rajan's and my code produce. The list your code produces is littered with blank cells whereas our list have no blank cells in them. If I add this line of code to your code...
Columns(1).SpecialCells(xlBlanks).Delete xlShiftUp
in order to "squeeze out" the blank cells, the code's time balloons to just under 2.5 seconds.
Bookmarks