Removing duplicates (with condition) in excel

2019-03-04 08:08发布

I have a sheet that consists of 3 columns and thousands of rows. The columns are First-Name, Last-Name, and E-Mail. not all of the entries (rows) have data in the E-Mail column - for some it's just left empty. The sheet contains "duplicates", which means two rows with both the same First name, and the same last name. I'd like to remove the duplicates in the following manner: If one of the duplicate entries has E-Mail address, remove the other. If both have E-Mail address, remove one of them (whichever one. say first, for example). And the same if both don't have E-Mail.

How can I do this task? (of-course, doing it manually is not an option).

Thanks.

1条回答
劳资没心,怎么记你
2楼-- · 2019-03-04 09:01

sort range by email address.
remove duplicates on the 1st 2 columns (elect all 3, but tell excel to use ony cols 1 & 2 to de-duplicate)
record this as a macro to see how excel does this with VBA

查看更多
登录 后发表回答