how do I add all numbers in the same cell... 1234 = 10

D

DR_LR_N_SC

I am using Excel 2003 and I am trying to simply add numbers in a cell.
for example cell A1 is 57, I want B1 to be 12 (5+7) and so on. I realize
this means adding the hundreds place, tens, place and ones place, I would
like to be able to modify the formula to let me add at least a 6 digit
number. is there a formula for doing this.
 
R

Ron Coderre

Try something like this:

With a number in A1

B1: =SUMPRODUCT(--MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1))

If A1: 1234........B1 returns 10
If A1: 1001........B1 returns 2

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
Top