Sum numbers in the same cell as text

joeben423

New Member
Joined
Oct 25, 2012
Messages
2
I download a text file from my bank's website and I want to add all the deposits. The problem is the excel download has the dollar amount and text in the same cell and I cannot add the number because it has text. This is creating an unnecessary step for me because to solve this I would retype the quantity on the B cell, and then I would add it with simple =sum(B1:B8). The problem is I have made mistakes with the retyping of numbers and it's tedious. Please help



[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]1/2/2018 Depsosit 1000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]1/2/2018 Depsosit 1000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]1/2/2018 Depsosit 1000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]1/2/2018 Depsosit 1000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]1/2/2018 Depsosit 1000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]1/2/2018 Depsosit 1000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]1/2/2018 Depsosit 1000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]Formula ?[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
 

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
how about either the formulas in colB, or just the formula in C1


Excel 2013/2016
ABC
11/2/2018 Depsosit 100010007000
21/2/2018 Depsosit 10001000
31/2/2018 Depsosit 10001000
41/2/2018 Depsosit 10001000
51/2/2018 Depsosit 10001000
61/2/2018 Depsosit 10001000
71/2/2018 Depsosit 10001000
87000
Sheet1
Cell Formulas
RangeFormula
B8=SUM(B1:B7)
B1=RIGHT(SUBSTITUTE(A1," ",REPT(" ",100)),100)*1
C1{=SUM(RIGHT(SUBSTITUTE(A1:A7," ",REPT(" ",100)),100)*1)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
You could use
- Sumproduct
- formula to extract amount or
- Data Text to Columns


Excel 2010
ABCD
11/2/2018 Deposit 10001,000.00
21/2/2018 Deposit 10001,000.00
31/2/2018 Deposit 10001,000.00
41/2/2018 Deposit 10001,000.00
51/2/2018 Deposit 10001,000.00
61/2/2018 Deposit 10001,000.00
711/2/2018 Deposit 500500.00
86,500.006,500.00
9
101000
111000
121000
131000
141000
151000
16500
176,500.00After using Text to Columns
18
3b
Cell Formulas
RangeFormula
B1=MID(A1,FIND("Deposit",A1,1)+8,LEN(A1))+0
B8=SUM(B1:B7)
A8=SUMPRODUCT(RIGHT(A1:A7,4)+0)
A17=SUM(A10:A16)
 
Upvote 0
Definitely use Aladin's solution if the word deposit is always in front of the trailing number. However, here is another possible single step solution in case the word deposit is not always in front of the trailing number...

=SUMPRODUCT(0+TRIM(RIGHT(SUBSTITUTE(B1:B7," ",REPT(" ",99)),99)))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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