Hi, Try this:-
Sub MG04Jun34
Dim Rng As Range, Rng2 As Range, Dn As Range, n As Long
Set Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
Set Rng2 = Range(Range("B2"), Range("B" & Rows.Count).End(xlUp))
Set Rng = Union(Rng, Rng2)
ReDim ray(1 To Rng.Count)
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For Each Dn In Rng
If Not .Exists(Dn.Value) Then
n = n + 1
.Add Dn.Value, n
If Dn.Column = 1 Then ray(n) = Dn.Value
Else
If Dn.Column = 2 Then
ray(.Item(Dn.Value)) = ""
End If
End If
Next
End With
With Range("C2").Resize(n)
.Value = Application.Transpose(ray)
.SpecialCells(xlCellTypeBlanks).Delete
End With
End Sub
Regards Mick
Bookmarks