Hey all,
I need a little help adding commas to this string. When I run this code below I get the result, A-(BCD)-(BCDEF). What i want is A-(B,C,D)-(B,C,D,E,F). I tried adding a join to it but keep getting a type mismatch error. Any help would be appreciated.
thanks
jeremy
![]()
strArray() = Split("A-BCD-BCDEF", "-") For j = LBound(strArray) To UBound(strArray) If Len(strArray(j)) > 1 Then newStr = newStr & "-(" & strArray(j) & ")" Else newStr = newStr & strArray(j) End If Next j
Bookmarks