Excel VBA: 从多列数据项中发现重复项,统计重复项出现次数和所在列
2016-10-16 20:06阅读:
Sub 提取重复项()
Dim d, d1 As Object
Dim arr
Dim i As Integer, j As Integer
Application.ScreenUpdating = False
Set d =
CreateObject('Scripting.Dictionary')
Set d1 =
CreateObject('Scripting.Dictionary')
Sheet1.Activate
arr = Range('A1:O59')
For i = 1 To UBound(arr, 1)
For j = 1
To UBound(arr, 2)
If arr(i, j) <> '' Then
If Not
d.exists(arr(i, j)) Then
d.Add arr(i, j), 1
