Hi all,
I have a list of names in Column A including duplicates and some names are marked in Column C.
What I would like a VBA macro to do is to loop through the range, find the FIRST name in column A in combination with a "Yes" mark in column C, and delete all duplicate rows containing the same name.
-If there are multiple rows with the same name and a "Yes" mark, the code should keep the first Row containing both and delete all other duplicate rows.
-Nothing will happen to rows that don't have duplicates.
So, after the code looped through the range the result will be:Please Login or Register to view this content.
Row 1 contains the first Jason and is marked "Yes" in Column C. Therefore all other rows containing Jason can be deleted from the list.Please Login or Register to view this content.
Row 2 had Sarah in it but was empty in Column C. The first row that contains Sarah in combination with a "Yes" in Column C has priority and so Row 7 should stay and other duplicate rows with Sarah should be deleted. etc.
Row 5 has no duplicate row so row 5 stays in the list.
Any suggestions?
Many thanks in advance.
Bookmarks