Add up all Numbers in a Cell with a Line Break?

Willy Excel

New Member
Joined
Jun 8, 2017
Messages
24
Sum ThesePlace Here:
2
1
3
0
1
2
3
22

<tbody>
</tbody>

Greetings! Is there a simple method to SUM all digits within a cell with line breaks?

Some cells in the column have no numbers, some have one number, and others have a line break with a number on top and number on bottom.

Or: is there a way to highlight the cells and show "Sum:" down bottom?

Thanks!<attachment></attachment>
 
A PC and the linefeed shows as chr(10) for me.

Have you tried the suggested solution from there?
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
NoSparks, I haven't yet, but that raises an interesting point. Do you guys think if I access the excel spreadsheet on a PC after solving it with 13 instead of 10 in the formula, it will not work anymore?
 
Upvote 0
Do you guys think if I access the excel spreadsheet on a PC after solving it with 13 instead of 10 in the formula, it will not work anymore?

I doubt very much that switching systems will alter the underlying values.
 
Upvote 0
I tested it on my work PC, and it did return an error message, but it was easily solved by changing the "13" back to "10." If there is any solution that would work on both Mac and PC, that would be terrific, although this is quite excellent (just have to do the 13/10 swap on that one column when switching between the Mac/PC). FormR, I read the link. My mistake on the multiple forum etiquette. Thanks for all the help.
 
Upvote 0
have to do the 13/10 swap on that one column when switching between the Mac/PC)

Hi, you could give this a try:

=SUMPRODUCT(0+(0&TRIM(MID(SUBSTITUTE(SUBSTITUTE(A2,CHAR(10),CHAR(13)),CHAR(13),REPT(" ",99)),{1,2}*99-98,99))))
 
Upvote 0
Form R, sorry for the delayed return to the topic. Working on that project again a month later. No luck with that latest formula. Your previous one works perfectly, however. Much appreciated!
 
Upvote 0
=IF(LEN(I2)>=2,SUM(LEFT(I2,1),RIGHT(I2,1),I2))

change I2 for the relevant cell then copy formula down
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,013
Members
448,935
Latest member
ijat

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