Sum Total Value of a Single Cell

JulianvO

New Member
Joined
Sep 9, 2022
Messages
29
Office Version
  1. 2021
Platform
  1. Windows
Greetings

Cell - A1 To contain formula

Cell - A2 To Display result of value entered into Cell A3

Cell - A3 Cell in which a numeric value is entered.

Formula must be-able to the sum total of the value entered into A3 and display the result in A2.

Example of Value entered into A3 1024 (No commas. spaces or plus signs. Just the number)

Sum total to be displayed in A2 must be 7 (1+0+2+4 = 7)

Example of Value entered into A3 123456789 (No commas. spaces or plus signs. Just the number)

Sum total to be displayed in A2 must be 45 (1+2+3+4+5+6+7+8+9=45)

Thanks
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi & welcome to MrExcel.
How about
Fluff.xlsm
AB
1
210247
312345678945
Data
Cell Formulas
RangeFormula
B2:B3B2=SUM(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)+0)
 
Upvote 0
Here is another approach:
MrExcel_20220909.xlsx
A
1
245
3123456789
Sheet4
Cell Formulas
RangeFormula
A2A2=SUM(0+MID(A3,ROW($A$1:INDEX($A:$A,LEN(A3))),1))

Edit: I suppose it's more sensible to use the 0+ rather than 1* approach to coerce text to numbers...revised above.
 
Last edited:
Upvote 0
Hi, and another twist, if you have a sensible maximum number of digits that could be in the cell (I've used 15 in this example)

Book1
AB
1
210247
312345678945
Sheet1
Cell Formulas
RangeFormula
B2:B3B2=SUM(MID(A2&REPT(0,15),{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},1)+0)
 
Upvote 0
Greetings Fjuff

Thanks for the speedy reply. I will try your solution.
 
Upvote 0
I would suggest using the formula from post#3 as it's not volatile
 
Upvote 0
Greetings

Thanks for the speedy reply. i will try your solution and see if it is what I require.
 
Upvote 0
Greetings

Thanks for the speedy reply. I will try your solution and see if it is what I need.
 
Upvote 0
Greetings

I have placed the formula into A1. I enter the following value 1024, into A3 and nothing happens.

What am I doing wrong?

Remember there is no text, commas, spaces or + signs, just the number.

The reason I need this is as follows:

Example:
Take number 1024. the sum total of this number 7 (1+0+2+4)
Now minus 7 from 1024 and you get 117. This remaining number is always divisible by 9. Answer is 13.
AS 9 is the square root of 3, the number will also be divisible by 3. Answer 39.

The above will apply to any number greater than 9. There will never be a remainder.
 
Upvote 0

Forum statistics

Threads
1,224,862
Messages
6,181,461
Members
453,043
Latest member
Sronquest

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