View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default How to retrieve text within ()?

On Tue, 23 Sep 2008 10:07:31 -0400, "Rick Rothstein"
wrote:

And we can even take part of your formula and combine it with part of my
formula to produce yet one more method...

=MID(REPLACE(A1,FIND(")",A1),99,""),FIND("(",A1)+ 1,99)

<g

--
Rick (MVP - Excel)


And, if he wants to add flexibility to his Excel, he could download and install
Longre's free morefunc.xll add-in from http://xcell05.free.fr/ and use this
formula:

=REGEX.SUBSTITUTE(A1,".*\(([^)]*).*","[1]")

or

=REGEX.MID(A1,"(?<=\()([^)]*)(?=\))")

--ron