extracting infomation from parenthesis when there are 2 sets within a string....?

Kim31669

New Member
Joined
Sep 30, 2014
Messages
2
I need to extract only the data within the last set of parenthsis. Here is my text.

[TABLE="width: 247"]
<TBODY>[TR]
[TD]Customer (Central) (SS01)

I used this formula:::
=MID(A7,FIND("(",A7&"(")+1,SUM(FIND({"(",")"},A7&"(0)")*{-1,1})-1)

and I returned the first text string. "central"

Please advise on how to modify it to return only the text from the last set of (). length of information in the last set of () varies from 1 to 4 characters.</SPAN>[/TD]
[/TR]
</TBODY><COLGROUP><COL></COLGROUP>[/TABLE]
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi Kim,

Try this

=MID(A7,SEARCH("(",A7,SEARCH("(",A7)+1)+1,(LEN(A7)-SEARCH("(",A7,SEARCH("(",A7)+1))-1)

Hope this help

Vândalo

P.S. - By the way - welcome to the board
 
Upvote 0
=left(mid(a7,find(char(4),substitute(a7,"(",char(4),len(a7)-len(substitute(a7,"(",""))))+1,100),find(")",mid(a7,find(char(4),substitute(a7,"(",char(4),len(a7)-len(substitute(a7,"(",""))))+1,100))-1)
 
Upvote 0
Thank you!

I am now getting the information from the 2nd set of parenthesis, but I am also getting the last ")" as well.

"SS01)"
 
Upvote 0
I need to extract only the data within the last set of parenthsis. Here is my text.

[TABLE="width: 247"]
<tbody>[TR]
[TD]Customer (Central) (SS01)

[/TD]
[/TR]
</tbody>[/TABLE]
If your text could be longer than 100 characters, increase the 100's to be longer than the count and change the 200 to twice the number you settle on)...

=TRIM(LEFT(RIGHT(SUBSTITUTE(SUBSTITUTE(A1,"(",")"),")",REPT(" ",100)),200),100))
 
Upvote 0
This formula extracts the text after the second opening bracket:

=IFERROR(SUBSTITUTE(MID(A1,FIND("(",A1,FIND("(",A1)+1)+1,40),")",""),"")
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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