Public Function GetOnly(ByVal strInput As String) As String
Dim dic As New Scripting.Dictionary
Dim i As Integer
Dim Words As Variant
strInput = Replace(strInput, ",", "")
Words = Split(strInput, " ")
For i = 0 To UBound(Words)
If Not dic.Exists(Words(i)) Then dic.Add Words(i), Words(i)
Next i
GetOnly = Join(dic.Items)
End Function
?GetOnly("Компонент майкрософт офис, майкрософт аксесс, приложение аксесс")
Компонент майкрософт офис аксесс приложение
|