Add Value of Digits in a Number with a Decimal Point

Weco Controller

New Member
Joined
Jun 11, 2014
Messages
10
On a city tax form I need to add the value of the digits in the payment amount. For example if the tax payment is $445.95 I need to add 4+4+5+9+5 which is 27. Is there a formula to add these numbers?
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Not sure if you realize this, but you posted this question to the "Test Here" Forum, which is just a place to test posting skills. If this is a real question that you would like answered, please post it to the "Excel Questions" Forum (Excel Questions).
 
Upvote 0
On a city tax form I need to add the value of the digits in the payment amount. For example if the tax payment is $445.95 I need to add 4+4+5+9+5 which is 27. Is there a formula to add these numbers?

Although this is posted in the wrong forum, I thought I'd help, so that the user may get the help desired...

I'd suggest using an array formula like the following to get the required result.

If the value is in cell A18, this ought to work in Excell 2007 or later:

=SUM(IFERROR(VALUE(MID(A18,ROW(INDIRECT("1:"&LEN(A18))),1)),0))

Be sure to enter the formula with Ctrl+Shift+Enter (and not just Enter) to make it an array formula.

I hope this helps, and you see it before it's deleted!
 
Upvote 0
By the way, the previous solution assumes you are entering currency amounts. If you happen to enter other formats, like dates, or things like "1/3" or "pi()" for example, and your cells is formatted as currency, you might see unexpected results. To force it to see the value as currency, you might try:

=SUM(IFERROR(VALUE(MID(TEXT(A18,"$0.00"),ROW(INDIRECT("1:"&LEN(TEXT(A18,"$0.00")))),1)),0))

Again, be sure to enter the formula with Ctrl+Shift+Enter (and not just Enter) to make it an array formula.
 
Upvote 0
Although this is posted in the wrong forum, I thought I'd help, so that the user may get the help desired...
The user will get help if they post in the correct forum and that help won't be deleted after a few days as threads in the Test Here forum are. :)
 
Last edited:
Upvote 0
I have moved the thread to the Excel Questions forum.
In the future, please do not post/respond to threads in the Test Here forum, for the reasons Peter outlines.
 
Upvote 0
For a non-array-entered, non-volatile alternative, try

=SUMPRODUCT((LEN(A18)-LEN(SUBSTITUTE(A18,{1,2,3,4,5,6,7,8,9},""))),{1,2,3,4,5,6,7,8,9})
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,175
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top