ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum all integers of a given number (https://www.excelbanter.com/excel-worksheet-functions/145807-sum-all-integers-given-number.html)

pchr

Sum all integers of a given number
 
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


Ron Coderre

Sum all integers of a given number
 
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)


"pchr" wrote in message
ups.com...
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




pchr

Sum all integers of a given number
 
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


On Jun 8, 5:37 pm, "Ron Coderre"
wrote:
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)

"pchr" wrote in message

ups.com...



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- Hide quoted text -


- Show quoted text -




Ron Coderre

Sum all integers of a given number
 
Regarding:
I'm currently using open office "calc" which has the same excel
functions and I can't get it to work overthere


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


"pchr" wrote:

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


On Jun 8, 5:37 pm, "Ron Coderre"
wrote:
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)

"pchr" wrote in message

ups.com...



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- Hide quoted text -


- Show quoted text -






All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com