Here's another way:
Option Explicit
#Const EarlyBound = False
Function CatUnique(r As Range, Optional sSep As String = ",") As String
CatUnique = Join(Unique(r), sSep)
End Function
Function Unique(r As Range, Optional bCount As Boolean = False) As Variant
' Returns an array containing the unique values in r
Dim cell As Range
#If EarlyBound Then
' Requires a reference to Microsoft Scripting Runtime
With New Scripting.Dictionary
#Else
' No reference required
With CreateObject("Scripting.Dictionary")
#End If
For Each cell In r
If Not (.Exists(cell.Value) Or IsEmpty(cell.Value)) Then
.Add Key:=cell.Value, Item:=vbNullString
End If
Next cell
If bCount Then Unique = .Count Else Unique = .Keys
End With
End Function
E.g., =CatUnique(A1:A10, "+")
Bookmarks