Sub SumStrings()
' hiker95, 09/05/2014, ME803498
Dim c As Range, MySum As String, s1, s2, i As Long
Application.ScreenUpdating = False
For Each c In Range("A1", Range("A" & Rows.Count).End(xlUp))
s1 = Split(c, ",")
MySum = "="
For i = LBound(s1) To UBound(s1)
If InStr(s1(i), "-") Then
s2 = Split(s1(i), "-")
If IsNumeric(s2(1)) Then
MySum = MySum & TextNum(s2(1), 0) & "+"
End If
End If
Next i
If Right(MySum, 1) = "+" Then MySum = Left(MySum, Len(MySum) - 1)
c.Offset(, 1).Formula = MySum
Next c
Application.ScreenUpdating = True
End Sub
Function TextNum(ByVal txt As String, ByVal ref As Boolean) As String
' jindon
' http://www.mrexcel.com/forum/showthread.php?t=362461
' =TextNum(A1,1)
' 1 for Text only, 0 for Numbers only
With CreateObject("VBScript.RegExp")
.Pattern = IIf(ref = True, "\d+", "\D+")
.Global = True
TextNum = .Replace(txt, "")
End With
End Function