Chip Pearson's DistinctValues function
Oops, a small mistake.. Try this
Function GetDistinctValueString(varRange As String)
Dim varCell As Range
For Each varCell In Range(varRange)
If InStr(GetDistinctValueString & ",", "," & 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
|