Sum

emvella

Board Regular
Joined
Apr 7, 2017
Messages
68
Office Version
  1. 2013
Platform
  1. Windows
Hi,

How can I paste numbers with dash in between like the ones below and it calculates the total 37? In other words I want a formula that it removes the dash and calculate all the numbers together 2+2+4+2+2 etc....

2-2
4-2
2-0
1-2
1-1
2-3
6-0
3-1
3-2
___
37

Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Text2Columns
then:

[Table="width:, class:head"][tr=bgcolor:#000000][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
1
[/td][td]2-2[/td][td]
2​
[/td][td]
2​
[/td][td]
4​
[/td][td]=SUM(B1:C1)[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
2
[/td][td]4-2[/td][td]
4​
[/td][td]
2​
[/td][td]
6​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
3
[/td][td]2-0[/td][td]
2​
[/td][td]
0​
[/td][td]
2​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
4
[/td][td]1-2[/td][td]
1​
[/td][td]
2​
[/td][td]
3​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
5
[/td][td]1-1[/td][td]
1​
[/td][td]
1​
[/td][td]
2​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
6
[/td][td]2-3[/td][td]
2​
[/td][td]
3​
[/td][td]
5​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
7
[/td][td]6-0[/td][td]
6​
[/td][td]
0​
[/td][td]
6​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
8
[/td][td]3-1[/td][td]
3​
[/td][td]
1​
[/td][td]
4​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
9
[/td][td]3-2[/td][td]
3​
[/td][td]
2​
[/td][td]
5​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
10
[/td][td][/td][td][/td][td][/td][td=bgcolor:#FFFF00]
37​
[/td][td]=SUM(D1:D9)[/td][/tr]
[/table]
 
Upvote 0
Hi,

If you have your range in cells A1:A9 and they are formatted as text, you can use the following:
=SUM(VALUE(LEFT(A1:A9,1)),VALUE(RIGHT(A1:A9,1)))
Enter it using Ctrl+Shift+Enter

Hope it helps!
 
Upvote 0
.. or with standard entry
=SUMPRODUCT(LEFT(A1:A9,FIND("-",A1:A9)-1)+REPLACE(A1:A9,1,FIND("-",A1:A9),""))

If we knew they were always single digits then it reduces to
=SUMPRODUCT(LEFT(A1:A9)+RIGHT(A1:A9))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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