Get the characters in between ()

zinah

Active Member
Joined
Nov 28, 2018
Messages
368
Office Version
  1. 365
Platform
  1. Windows
Hi,

I need a formula that can get the characters in between the ( ), is there any recommendation? Here's the a sample table:

Current Name​
Results​
AA BB (227501AA)​
227501AA​
A BBD (227501BA)​
227501BA​
AAC BBS (CC7501AA)​
CC7501AA​
AA DDAA (117501AA)​
117501AA​

Thank you!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
How about
Excel Formula:
=MID(SUBSTITUTE(A2,")",""),FIND("(",A2)+1,100)
 
Upvote 0
Solution
AN alternative is to use Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Extracted Text Between Delimiters" = Table.TransformColumns(Source, {{"Current Name", each Text.BetweenDelimiters(_, "(", ")"), type text}})
in
    #"Extracted Text Between Delimiters"
 
Upvote 0
If, as your examples show, the value you want to retrieve is always 8 characters long, then this can be used...

=MID(A1,FIND("(",A1)+1,8)
 
Upvote 0
AN alternative is to use Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Extracted Text Between Delimiters" = Table.TransformColumns(Source, {{"Current Name", each Text.BetweenDelimiters(_, "(", ")"), type text}})
in
    #"Extracted Text Between Delimiters"
Thank you so much!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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