Try this:
It loops through your data in Column A from the bottom up, and for each row, compares the first n characters with the cell above (as long as both cells have something in them). If they are different, then a row is inserted. The number of characters which defines a match is controlled with parameter iLeftChars.
The Application stuff is to stop the screen flickering, and speed up performance, when applying to large datasets. The error handling makes sure that we reset the application stuff, even if an error happens, and that errors don't cause a horrible message to be displayed.
Make sense?
Bookmarks