Hello,
I am looking for a script that finds Duplicates in one column then if there is a match, looks at row B's value and deletes the row with the lowest value.
I can write the if statements pretty easily for the last past of the script (comparing cells and then deleting), but am having trouble writing the first part that loops down through the first column.
Essentially, I am looking for this:
It would just loop down through the list once, and compare cell A1 to A2 to see if they are equal (if they are not then it would compare A2 to A3), if they are equal then it would compare B1 to B2, and if B1 is greater than B2, delete row 2, If B1 = B2 then delete row 2, else loops to compare A2 to A3.
Once the delete occurs, it then goes back and compares A1 to the new A2 so it catches any additional duplicates. Or for simplicity, I just run the loop four or five times to catch all the duplicates.
Thanks! in advance!
Bookmarks