View Single Post
 
Old 05-09-2014, 06:20 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
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

You could use a UDF for this:
Code:
Public Function SUMCELLNUMS(Source As Range, StrSplit As String)
Dim StrIn As String, StrTmp As String, ValOut, i As Long
StrIn = Trim(Replace(Source.Text, "'", ""))
For i = 0 To UBound(Split(StrIn, StrSplit))
  StrTmp = Trim(Split(StrIn, StrSplit)(i))
  If IsNumeric(StrTmp) Then
    ValOut = Evaluate(ValOut + StrTmp)
  End If
Next
SUMCELLNUMS = ValOut
End Function
Simply add the above function to a normal code module in the workbook, then use a formula like:
=SUMCELLNUMS(A1, ",")
where A1 is the cell reference and "," is the delimiter.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote