Sum the single cell values.

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,422
Office Version
  1. 2010
Using Excel 2010

Hello,

My data looks like as below given example I got some formula from MrExcel but it does not seem to work, in the cell C6 hitting F2 I noticed that after a last coma there is one space also. Please could someone take a look and make it work to give a sum in range column “D” each of the columns “C” value are in a single cell....Expected sum are shown in the column "E"

Note: I want a formula or a macro which can be used in Excel 2000 also.

Sort By Range.xls
BCDE
3
4Value In SingleSumExpected Sum
5CellValues
62 , 5 , 11 , 15 , 44 , #¡VALOR!77
76 , 20 , 34 , 36 , 38 , #¡VALOR!134
816 , 30 , 35 , 42 , 43 , #¡VALOR!166
94 , 10 , 22 , 42 , 49 , #¡VALOR!127
1019 , 21 , 36 , 39 , 44 , #¡VALOR!159
1116 , 17 , 18 , 35 , 41 , #¡VALOR!127
121 , 7 , 37 , 41 , 48 , #¡VALOR!134
1319 , 29 , 40 , 46 , 50 , #¡VALOR!184
14
Sheet2
Cell Formulas
RangeFormula
D6:D13D6=SUM(0+TRIM(MID(SUBSTITUTE(","&C6,",",REPT(" ",99)),ROW(INDEX($C$1:$C$20,1):INDEX($C$1:$C$20,(1+LEN(C6)-LEN(SUBSTITUTE(C6,",","")))))*99,99)))
Press CTRL+SHIFT+ENTER to enter array formulas.


Regards,
Moti
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
How about
Excel Formula:
=SUM(0+TRIM(MID(SUBSTITUTE(","&C6,",",REPT(" ",99)),ROW(INDEX($C$1:$C$20,1):INDEX($C$1:$C$20,(LEN(C6)-LEN(SUBSTITUTE(C6,",","")))))*99,99)))
 
Upvote 0
Or try

Book1
BCDE
2
3
4Value In SingleSumExpected Sum
5CellValues
62 , 5 , 11 , 15 , 44 , 7777
76 , 20 , 34 , 36 , 38 , 134134
816 , 30 , 35 , 42 , 43 , 166166
94 , 10 , 22 , 42 , 49 , 127127
1019 , 21 , 36 , 39 , 44 , 159159
1116 , 17 , 18 , 35 , 41 , 127127
121 , 7 , 37 , 41 , 48 , 134134
1319 , 29 , 40 , 46 , 50 , 184184
Sheet1
Cell Formulas
RangeFormula
D6:D13D6=SUM(0+(0&TRIM(MID(SUBSTITUTE(C6,",",REPT(" ",99)),ROW($C$1:$C$20)*99-98,99))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 1
Solution
How about
Excel Formula:
=SUM(0+TRIM(MID(SUBSTITUTE(","&C6,",",REPT(" ",99)),ROW(INDEX($C$1:$C$20,1):INDEX($C$1:$C$20,(LEN(C6)-LEN(SUBSTITUTE(C6,",","")))))*99,99)))
Hello Fluff, conformed your formula worked OK.

I appreciate your help. Wish you Good Luck!

Kind Regards,
Moti :)
 
Upvote 0
Or try

Book1
BCDE
2
3
4Value In SingleSumExpected Sum
5CellValues
62 , 5 , 11 , 15 , 44 , 7777
76 , 20 , 34 , 36 , 38 , 134134
816 , 30 , 35 , 42 , 43 , 166166
94 , 10 , 22 , 42 , 49 , 127127
1019 , 21 , 36 , 39 , 44 , 159159
1116 , 17 , 18 , 35 , 41 , 127127
121 , 7 , 37 , 41 , 48 , 134134
1319 , 29 , 40 , 46 , 50 , 184184
Sheet1
Cell Formulas
RangeFormula
D6:D13D6=SUM(0+(0&TRIM(MID(SUBSTITUTE(C6,",",REPT(" ",99)),ROW($C$1:$C$20)*99-98,99))))
Press CTRL+SHIFT+ENTER to enter array formulas.
Hello Phuoc, I like your compact formula it results as requested. 👌

I appreciate your help. Wish you Good Luck!

Kind Regards,
Moti :)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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