Extract numbers, with decimal places, from a cell and sum them without VBS

trishtomorrow

New Member
Joined
May 19, 2002
Messages
21
I have numbers within a cell that always appear within parentheses.

first item (.3) second item (1.2) third item (.5) next item (10.3)

They have decimal values. Without using code (not allowed) is there a way to extract the numbers and sum them in another cell.
I did find the substitute function illustrated below, and it just extracts the number, not the actual values I need. It's close, and maybe someone knows how to tweak it to get the numbers out of the parentheses as decimal values.

=SUBSTITUTE(TRIM(CONCAT(IFERROR(0+MID(A1,SEQUENCE(LEN(A1)),1)," ")))," ","+")

Thanks in advance.

1649967868116.png
 

Attachments

  • excel extract.png
    excel extract.png
    13 KB · Views: 2

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi,

Don't understand what result you're looking for, may be:

Book3.xlsx
ABCDEFG
1first item (.3) second item (1.2) third item (.5) next item (10.3)0.31.20.510.3 12.3
Sheet1085
Cell Formulas
RangeFormula
B1:F1B1=IFERROR(MID(SUBSTITUTE(SUBSTITUTE($A1,"(",REPT(" ",100),COLUMNS($B1:B1)),")",REPT(" ",100),COLUMNS($B1:B1)),100,100)+0,"")
G1G1=SUM(B1:E1)
 
Upvote 0
How about
+Fluff 1.xlsm
AB
1
2first item (.3) second item (1.2) third item (.5) next item (10.3)12.3
Current
Cell Formulas
RangeFormula
B2B2=ABS(SUM(FILTERXML("<k><m>"&SUBSTITUTE(A2," ","</m><m>")&"</m></k>","//m")))
 
Upvote 0
It would help if you included your version of Excel in your profile. If you have XL365, then Fluff's formula should work for you. If you have an earlier version of Excel, then you can use this formula...
Excel Formula:
=SUMPRODUCT(0+(0&TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"(",")"),")",REPT(" ",300)),(2*ROW(1:50)-1)*300,300))))
Note: This formula assumes the text in the cell is less than 300 characters in length and that there will be no more than 50 numbers to be added together (change the 50 and all the 300 as needed if your limits could be higher).
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,542
Members
449,316
Latest member
sravya

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