Delete duplicates between two sheets “Case Sensiti

2019-09-16 02:54发布

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"

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.

标签: excel vba
1条回答
太酷不给撩
2楼-- · 2019-09-16 03:04

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
查看更多
登录 后发表回答