简体   繁体   English

使用VBA在Excel中删除单元格重复项

[英]Remove cell duplicates in Excel using VBA

I am working with huge amount of data. 我正在处理大量数据。 For example I have 2 columns with data (10k each) and I need to find and remove the duplicates in one of the columns. 例如,我有2列包含数据(每列10k),我需要在其中一列中查找并删除重复项。 Highlighting the duplicates is easy but I would like to find a way (formula or VBA) that performs that for me in Excel. 突出显示重复项很容易,但是我想找到一种在Excel中为我执行此操作的方法(公式或VBA)。

You won't find a faster method than the VBA version of Data ► Data Tools ► Remove Duplicates. 您找不到比VBA版本的“数据”►“数据工具”►“删除重复项”更快的方法。

ActiveSheet.Range("E:E").RemoveDuplicates Columns:=1, Header:=xlYes

Post back if you have an earlier version of Excel. 如果您有早期版本的Excel,请发回。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM