Hi
I was provided with a UDF by Macropod a couple of years ago which I need modifying. Basically I need the UDF modified. The UDF basically converts values like "365SS+4wks, 175" to "365, 175". Where I need the UDF changed is allow values such as "23,456,567,666" to remain as shown. Here is a copy of the UDF:
Code:
Function ParseIt(StrIn As Variant) As Variant
Dim i As Long, j As Long, k As Long
Dim StrTmp As String, StrOut As String
For i = 0 To UBound(Split(StrIn, ","))
StrTmp = Split(Split(Split(StrIn, ",")(i), "+")(0), "-")(0)
k = Len(StrTmp)
For j = k To 1 Step -1
If Not IsNumeric(Mid(StrTmp, j, 1)) Then
StrTmp = Replace(StrTmp, Mid(StrTmp, j, 1), "")
End If
Next
StrOut = StrOut & StrTmp & ","
Next
ParseIt = Left(StrOut, Len(StrOut) - 1)
End Function
Any help appreciated.
Tony