
Option Explicit
Sub 字典筛选()
Dim i, a, d, m, t
Set d = CreateObject("scripting.dictionary")
a = [a1].CurrentRegion.Offset(1).Resize(, 2).Value
For i = 1 To UBound(a) - 1
d(a(i, 1) & Space(1) & a(i, 2)) = d(a(i, 1) & Space(1) & a(i, 2)) + 1
Next
For Each i In d.keys
If d(i) > 1 Then
t = Split(i)
m = m + 1
a(m, 1) = t(0): a(m, 2) = t(1)
End If
Next
With [d2]
.Resize(UBound(a), 2).ClearContents
If m > 0 Then .Resize(m, 2) = a
End With
End Sub