Removing duplicates (with condition) in excel

心不动则不痛 提交于 2019-12-02 20:08:20

问题


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:


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



来源:https://stackoverflow.com/questions/10996126/removing-duplicates-with-condition-in-excel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!