Replacing () around numbers of varying length, in text thread of varying length

MargieRoberts

New Member
Joined
Apr 16, 2019
Messages
1
This one is baking my noodle. I need the digit in () extracted into a separate column. These are all values in Column A, though some columns are indented. Ideas, please??

01. First Week (1)
None (1)
10/09/2018 (1)
Initial Onboarding Complete
01. First Week (1)
None (1)
07/30/2018 (1)
Initial Onboarding Complete
01. First Week (1)
None (1)
10/09/2018 (1)
First Week Onboarding Complete
01. January (2)
None (2)
03/12/2018 (2)
SolidFire 4805 Support Renewal
Amtelco Infinity Support Renewal
01.03.2019 (5)
None (5)
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Assuming that there is only one set of parentheses like your sample this should work.


Book1
AB
101. First Week (1)1
2None (1)1
310/09/2018 (1)1
4Initial Onboarding Complete
501. First Week (1)1
6None (1)1
707/30/2018 (1)1
8Initial Onboarding Complete
901. First Week (1)1
10None (1)1
1110/09/2018 (1)1
12First Week Onboarding Complete
1301. January (2)2
14None (2)2
1503/12/2018 (2)2
16SolidFire 4805 Support Renewal
17Amtelco Infinity Support Renewal
1801.03.2019 (5)5
19None (5)5
Sheet1
Cell Formulas
RangeFormula
B1=IFERROR(MID(A1,SEARCH("(",A1)+1,SEARCH(")",A1)-1-SEARCH("(",A1)),"")
 
Upvote 0
another way using PowerQuery (Get&Transform)

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#70AD47]Column1[/td][td=bgcolor:#70AD47]Text Between Delimiters[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]01. First Week (1)[/td][td=bgcolor:#E2EFDA]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]None (1)[/td][td]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]10/09/2018 (1)[/td][td=bgcolor:#E2EFDA]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Initial Onboarding Complete[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]01. First Week (1)[/td][td=bgcolor:#E2EFDA]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]None (1)[/td][td]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]07/30/2018 (1)[/td][td=bgcolor:#E2EFDA]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Initial Onboarding Complete[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]01. First Week (1)[/td][td=bgcolor:#E2EFDA]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]None (1)[/td][td]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]10/09/2018 (1)[/td][td=bgcolor:#E2EFDA]
1​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]First Week Onboarding Complete[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]01. January (2)[/td][td=bgcolor:#E2EFDA]
2​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]None (2)[/td][td]
2​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]03/12/2018 (2)[/td][td=bgcolor:#E2EFDA]
2​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]SolidFire 4805 Support Renewal[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Amtelco Infinity Support Renewal[/td][td=bgcolor:#E2EFDA][/td][/tr]

[tr=bgcolor:#FFFFFF][td]01.03.2019 (5)[/td][td]
5​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]None (5)[/td][td=bgcolor:#E2EFDA]
5​
[/td][/tr]
[/table]

Code:
[SIZE=1]
let
    Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
    #"Inserted Text Between Delimiters" = Table.AddColumn(Source, "Text Between Delimiters", each Text.BetweenDelimiters([Column1], "(", ")"), type text)
in
    #"Inserted Text Between Delimiters"[/SIZE]
 
Upvote 0

Forum statistics

Threads
1,224,753
Messages
6,180,748
Members
452,996
Latest member
nelsonsix66

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