删除两张纸之间的重复项“区分大小写” [英] Delete duplicates between two sheets "Case Sensitive"

查看:212
本文介绍了删除两张纸之间的重复项“区分大小写”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想比较Excel中的两张表,如果vba发现重复,将会删除它们。
我搜索了一段时间,最后我找到了我想要的。
如何删除重复项在两个excel表之间快速vba

I want to compare two sheets in excel and if vba found duplicates it will delete them. I have searched for a while and finally I have find what I want here. "How do I delete duplicates between two excel sheets quickly vba"

但在我的情况下,这对我来说没有效果。因为这个脚本认为
abc和AbC是重复的。
所以还是要修改脚本,所以对所有的字母都是区分大小写的。

But in my case this didn't work for me. because this script consider that abc and AbC are duplicates. So is there anyway to modify the script so it will be case sensitive for all letters.

推荐答案

更改CompareMode的字典。有关详细信息,请访问: http:// msdn.microsoft.com/en-us/library/a14xez73(v=vs.84).aspx

Change the CompareMode of the dictionary. For detailed information have a look here: http://msdn.microsoft.com/en-us/library/a14xez73(v=vs.84).aspx

Dim dict As Object
Set dict = CreateObject("Scripting.Dictionary")
' add this line:
dict.CompareMode = BinaryCompare

这篇关于删除两张纸之间的重复项“区分大小写”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆