SiHodgy007
asked on
How to make sure there are no duplicate added to a string
After calling this function I would like to know how to make sure duplicate entries don't go in.
Function getEmailString(ByVal Rng As Range) As String
Dim Cell As Range
Dim Str As String
For Each Cell In Rng
If Cell <> "" Then
If Str = "" Then
Str = Cell.Value
Else
Str = Str & ";" & Cell.Value
End If
End If
Next Cell
getEmailString = Str
End Function
Function getEmailString(ByVal Rng As Range) As String
Dim Cell As Range
Dim Str As String
For Each Cell In Rng
If Cell <> "" Then
If Str = "" Then
Str = Cell.Value
Else
Str = Str & ";" & Cell.Value
End If
End If
Next Cell
getEmailString = Str
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I provided the same function in your last question. :)
ASKER
I know I opened this as instructed before you answered and couldn't close it
No problem then. I thought the function didn't work for you so you posted the same question again. :)