And I need macros that will return the same string without duplicates, i.e. "test1, test2, test3, test4, test5".
I've found VBA for Excel but I can't translate it to Open Office working script.
http://www.ozgrid.com/forum/showthread.php?t=69682
This one works in Excel but not in Calc:
Code: Select all
Function stringOfUniques(inputString As String) As String
Dim inArray() As String
Dim xVal As Variant
inArray = Split(inputString, ",")
For Each xVal In inArray
If InStr(stringOfUniques, Trim(xVal)) = 0 Then _
stringOfUniques = stringOfUniques & Trim(xVal) & ","
Next xVal
End Function