Extract and summarize decimal values

Ali4772

New Member
Joined
Jan 7, 2025
Messages
3
Office Version
  1. 2024
Platform
  1. Windows
Hi everyone
I have a string like ( jhsjdhbk 5.12 sdbasucibac 24.25)
I need to extract both decimal values and summarize
the result should be 5.12 + 24.25 = 29.37

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Welcome to the Board!

Will it ALWAYS follow this format?
Word <space> number <space> word <space> number

If not, please show examples of ALL the different ways this may be structured.
 
Upvote 0
Welcome to the Board!

Will it ALWAYS follow this format?
Word <space> number <space> word <space> number

If not, please show examples of ALL the different ways this may be structured.
No every cell is different
it could have 3 value or 4 value
the main requirement is extracting all values separately and then sum them
 
Upvote 0
Hmmm, some very advanced people may be able to come up with an Excel formula that can do it, but the only way I can think of is to create my own User Defined Function in VBA.
Once created, you would simply just use this function like any other native Excel function.
Are you open to that kind of solution?
I don't want to go through the trouble of writing it if you are not willing or able to use VBA (you don't need to know any VBA, what I will create for you is just a "plug-and-play" solution).
 
Upvote 0
Try:
Excel Formula:
=SUM(IFERROR(--TEXTSPLIT(A1," "),0))
Oh, I forgot that the SUM function will simply ignore text entries (and it won't cause any errors!), making this much simpler than I thought!
Nice work, Cubist!
 
Upvote 0
Another way without using IFERROR...
Excel Formula:
=SUM(TOROW(0+TEXTSPLIT(A1," "),3))
 
Upvote 0

Forum statistics

Threads
1,226,079
Messages
6,188,771
Members
453,499
Latest member
samdan87153

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