Dim Cell as Range
Dim DSO as Object
Dim DstRng as Range
Dim Key as Variant
Dim RngEnd as Range
Dim SrcRng as Range
Dim Wks as Worksheet
'Set the ranges on the worksheet
Set DstRng = Wks.Range("D1")
Set SrcRng = Wks.Range("A1")
'Determine the SrcRng size
Set RngEnd = Wks.Cells(Rows.Count, SrcRng.Column).End(xlUp)
Set SrcRng = IIf(RngEnd.Row < SrcRng.Row, SrcRng, Wks.Range(SrcRng, RngEnd))
'Clear the desintation range
Set RngEnd = Wks.Cells(Rows.Count, DstRng.Column).End(xlUp)
Set DstRng = IIf(RngEnd.Row < DstRng.Row, DstRng, Wks.Range(DstRng, RngEnd))
DstRng.ClearContents
'Create the Dictionary Object
Set DSO = CreateObject("Scripting.Dictionary")
'Set text comparisons not to be case sensitive
DSO.CompareMode = vbTextCompare
'Save each entry along with the number of times it occurs
For Each Cell In SrcRng
Key = Trim(Cell.Value)
If Key <> "" And Not DSO.Exists(Key) Then
DSO.Add Key, 1
Else
DSO(Key) = DSO(Key) + 1
End If
Next Cell
'List only entries that appear once
For Each Key In DSO.Keys
If DSO(Key) = 1 Then
R = R + 1
DstRng.Cells(R, 1) = Key
End If
Next Key
'Release the object and memory it uses
Set DSO = Nothing