Chip Pearson's DistinctValues function
Dear Mike
Launch VBE using Alt+F11, Insert module and paste the below function. Access
this under UserDefined functions.
Function GetDistinctValueString(varRange As String)
Dim varCell As Range
For Each varCell In Range(varRange)
If InStr(strTemp & ",", "," & varCell.Text & ",") = 0 Then
GetDistinctValueString = GetDistinctValueString & "," & varCell.Text
End If
Next
GetDistinctValueString = Mid(GetDistinctValueString, 2)
End Function
If this post helps click Yes
--------------
Jacob Skaria
|