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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Text2Columns
then:

A
B
C
D
E
1
2-2
2​
2​
4​
=SUM(B1:C1)
2
4-2
4​
2​
6​
3
2-0
2​
0​
2​
4
1-2
1​
2​
3​
5
1-1
1​
1​
2​
6
2-3
2​
3​
5​
7
6-0
6​
0​
6​
8
3-1
3​
1​
4​
9
3-2
3​
2​
5​
10
37​
=SUM(D1:D9)
 
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,214,834
Messages
6,121,874
Members
449,056
Latest member
ruhulaminappu

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