Get the characters in between ()

zinah

Active Member
Joined
Nov 28, 2018
Messages
358
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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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,216,028
Messages
6,128,399
Members
449,446
Latest member
CodeCybear

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