Add (sum) numbers within cells

  • Thread starter Thread starter Clint
  • Start date Start date
C

Clint

Using Excel 2007 with SP2, how can I enter and summarize multiple numbers
within one cell?
IE. 1+5+8+...=____
Or is this even possible?
Thanks for anything on this. Jim
 
One way:

A1: 1+5+8

=SUMPRODUCT(--MID(SUBSTITUTE(A1,"+",0),ROW(INDIRECT("1:" & LEN(A1))),1))

Result = 14
 
=SUMPRODUCT(--MID(SUBSTITUTE(A1,"+",0),ROW(INDIRECT("1:" & LEN(A1))),1))

Caveat!

That formula only sums *the individual digits*. It won't work when you have
numbers like:

1+20+300+4000

The formula would return the sum of: 1+2+3+4 = 10
 
None that I know of.

Perhaps Mike meant to use a UDF like this.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function

=EvalCell(A1) where A1 contains 1+5+8


Gord Dibben MS Excel MVP
 
Back
Top