Add (sum) numbers within cells

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
 
T

T. Valko

One way:

A1: 1+5+8

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

Result = 14
 
T

T. Valko

=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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top