試試看
sub test1()
Dim d As Object, a
Set d = CreateObject("Scripting.Dictionary")
With Sheets(1)
For Each a1 In .Range(.Cells(2, 1), .Cells(65536, 1).End(xlUp))
d(a1.Value) = ""
Next
n1 = d.Count
For Each a1 In .Range(.Cells(2, 2), .Cells(65536, 2).End(xlUp))
d(a1.Value) = ""
Next
n2 = d.Count
If n2 =n1 Then exit sub
a = d.keys
k = .Cells(65536, 1).End(xlUp).Row
For I = n1 + 1 To n2
.Cells(k + 1, 1) = a(I - 1)
k = k + 1
Next
End With