I would create a simple uDF
Public Function GetUniques(rng As Range) As String
Dim coll As Collection
Dim itm As Variant
Dim tmp As String
Dim LastRow As Long
Dim i As Long
With rng
Set coll = New Collection
LastRow = .Cells(.Parent.Rows.Count, .Cells(1, 1).Column).End(xlUp)
On Error Resume Next
For i = 1 To LastRow
If .Parent.Cells(i, .Cells(1, 1).Column).Value2 <> "" Then
coll.Add CStr(.Parent.Cells(i, .Cells(1, 1).Column).Value2), CStr(.Parent.Cells(i, .Cells(1, 1).Column).Value2)
End If
Next i
On Error GoTo 0
For Each itm In coll
tmp = tmp & itm & ","
Next itm
GetUniques = Left$(tmp, Len(tmp) - 1)
End With
End Function
and use that like so
=GetUniques(A1:A200)
Bookmarks