Extract numbers and operators from a cell containing combination of texts, numbers and operators

rdeguzman

New Member
Joined
Nov 30, 2010
Messages
4
Hi everyone, appreciate if anyone can help me to create a formula to extract numbers and operators from a cell containing combination of texts, numbers and operators in random sequence.

sample value in cell say =100days* (3hrs+0.050weeks)/4
target result =100*(3+0.050)/4

Appreciate everyone's idea if there can be a formula to solve my query above.
Thanks heaps in advance.
 
or if you want the result of equation
View attachment 14823
Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    TS = Table.AddColumn(Source, "Result", each Expression.Evaluate(Text.Select([raw],{"0".."9","*","+","/","(",")","."}))),
    TSC = Table.SelectColumns(TS,{"Result"})
in
    TSC

Hi Sandy,
Thanks for your reply, I'm new to Power query - your method can only be used using power query, which means the cell must be in a table and table to be uploaded as query and needs to be refresh to to get the result, is this right?
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,215,579
Messages
6,125,646
Members
449,245
Latest member
PatrickL

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