Sum all integers of a given number

P

pchr

Hi,
Is there an easy way to arrange a formula that will Sum all integers
of a given number?

such that when applied on colum A, the result will be B:

21 3
77 14
12345 15
1 1
321 6

thanks for you help,
pchr
 
R

Ron Coderre

With
A1: (a number)

This formula sums each digit in that number
B1: =SUMPRODUCT(--MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1))

Example:
A1: 123
B1 returns 6


Does that help?
------------

Regards,

Ron
Microsoft MVP (Excel)
 
P

pchr

Thanks for you help,
I'm currently using open office "calc" which has the same excel
functions and I can't get it to work overthere
 
R

Ron Coderre

Regarding:
Evidently, not exactly the same, though, right?

If Open Office has a forum, that would be the place to ask the question.

I hope that helps.
***********
Regards,
Ron

XL2002, WinXP
 

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