View Single Post
 
Old 12-13-2013, 02:15 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
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
If IsNumeric(StrIn) Then
  ParseIt = StrIn
  Exit Function
End If
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
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote