Hi, I finally wrote a couple of macros in VBA that I wanted to do and they work but for some reason they do not complete the task properly and I have to run the macro over and over again to finish completely. For instance I wrote a program in VBA to remove rows of data that contain duplicate cells in the same row. This program goes thru a spead sheet row by row and compares the values in the first cell with the next cell, so on and so forth until the whole row is checked for either a duplicate or a value that is higher than the next cell. If either condition is met then the program deletes the row and moves on to the next row checking in the same manner and shifts up to remove the empty rows. But, the program does not complete its task on the first try. For a spreadsheet of about 700 rows it takes about 6 or 7 runs of the macro to remove all duplicates ect... Why is this?
Here's a copy of the code:
Option Explicit
Can anyone tell me why I'm having an issue with incomplete macro tasking?![]()
Please Login or Register to view this content.
Thanks,
Sebastien.
Bookmarks