
Option Explicit
Sub abc()
Dim a, i, j, d, m, n
a = [b1].CurrentRegion.Resize(, 2).Value
ReDim b(1 To 2 * UBound(a), 1 To 2)
Set d = CreateObject("scripting.dictionary")
For j = 1 To 2
For i = 2 To UBound(a)
If Len(a(i, j)) = 0 Then Exit For
d(a(i, j)) = d(a(i, j)) + 1 * (-1) ^ (j - 1)
Next
Next
For Each i In d.keys
If d(i) > 0 Then n = 1 Else n = 2
For j = 1 To Abs(d(i))
m = m + 1
b(m, n) = i
Next
Next
[e2].Resize(UBound(b), 2) = b
End Sub