View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom[_2_] Peo Sjoblom[_2_] is offline
external usenet poster
 
Posts: 964
Default Extract text within ( )

If there always will be a space before the parenthesis
with the string you want to extract

=SUBSTITUTE(MID(A1,FIND("^^",SUBSTITUTE(A1,"
","^^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))+2,255),")","")



--


Regards,


Peo Sjoblom

"M" wrote in message
...
Thank you ever so much Peo -
WORKED GREAT!!!!!
On going through a long list it turned out that there were cases
with additional parenthesis -
But the prenethesis which I want to extract the text from is the
one on the furthest right.
For example I found one that looked like:
"My Text String (XPYZ (MTS)" in addition
"My Text String (MTS)"
and I still want to return MTS from both examples






"Peo Sjoblom" wrote:

Are those the only parenthesis?

=SUBSTITUTE(MID(A1,FIND("(",A1)+1,255),")","")

replace A1 with your cell



--


Regards,


Peo Sjoblom

"M" wrote in message
...
Formula to enter to extract the text within ( ) in a text string
Example: "My Text String (MTS)" and extract or return MTS
Currently the "(XXX)" is always at the end of the text string
Using MS Excel 2002