Function RemoveDupeChar(s As String, Optional d As String = ",") As String
'Removes duplicate characters from a string that is delimited
'2nd arguement can either be provided or will be a comma by default
Dim N As Variant
Dim NewString As String
N = Split(s, d)
NewString = d
'cycle through all the parts
For i = 0 To UBound(N)
'Check to see if word/character is already in list
If Not NewString Like "*" & d & N(i) & d & "*" Then
NewString = NewString & d & N(i)
End If
Next
RemoveDupeChar = Mid(NewString, 2 * Len(d) + 1, Len(s))
End Function