Stripping out data

Angus McBagpipe

New Member
Joined
Mar 1, 2007
Messages
36
I have and column that reads this "8.50 (13.0)".
I would like to strip out the data into 2 columns and remove the parenthesis from the second one.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
A couple of steps in Power Query.
Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Split Column by Delimiter" = Table.SplitColumn(Source, "Column1", Splitter.SplitTextByDelimiter("(", QuoteStyle.Csv), {"Column1.1", "Column1.2"}),
    #"Split Column by Delimiter1" = Table.SplitColumn(#"Split Column by Delimiter", "Column1.2", Splitter.SplitTextByDelimiter(")", QuoteStyle.Csv), {"Column1.2.1", "Column1.2.2"}),
    #"Removed Columns" = Table.RemoveColumns(#"Split Column by Delimiter1",{"Column1.2.2"})
in
    #"Removed Columns"
 
Upvote 0
How about


Book1
ABC
28.50 (13.0)8.5013.0
Request
Cell Formulas
RangeFormula
B2=LEFT(A2,FIND(" ",A2)-1)
C2=SUBSTITUTE(MID(A2,FIND("(",A2)+1,100),")","")
 
Upvote 0
another way with PowerQuery (Get&Transform)

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Split = Table.SplitColumn(Source, "Column1", Splitter.SplitTextByAnyDelimiter({" ("}, QuoteStyle.Csv)),
    Replace = Table.ReplaceValue(Split,")","",Replacer.ReplaceText,{"Column1.2"}),
    Type = Table.TransformColumnTypes(Replace,{{"Column1.1", type number}, {"Column1.2", type number}})
in
    Type[/SIZE]

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]Column1[/td][td][/td][td=bgcolor:#70AD47]Column1.1[/td][td=bgcolor:#70AD47]Column1.2[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]8.50 (13.0)[/td][td][/td][td=bgcolor:#E2EFDA]
8.5​
[/td][td=bgcolor:#E2EFDA]
13​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]10.44 (11.11)[/td][td][/td][td]
10.44​
[/td][td]
11.11​
[/td][/tr]
[/table]
 
Last edited:
Upvote 0
Very cool, but this one is over my head.
Reminds me just how little I know about Excel.
But thanks and I will follow up on this with some study.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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