Copy Text String from between ()

J

Jamie.Cutting

A simple one hopefully, I am trying to FIND a text string which always
occurs between brackets and copy it into another column.

Example, I want to copy the word "Apples" from cell A1 to cell B1
where A1 has the following Text :

Peaches Cream (Apples) Bannana Cherries.

Many thanks for any help
 
P

Pete_UK

With your string in A1, use this formula:

=IF(ISERROR(MID(A1,SEARCH("(",A1)+1,SEARCH(")",A1)-
SEARCH("(",A1)-1)),"",MID(A1,SEARCH("(",A1)+1,SEARCH(")",A1)-
SEARCH("(",A1)-1))

All one formula - be wary of spurious line-breaks on the newsgroups.

If you do not have either an opening or closing bracket, or if your
closing bracket occurs before the opening bracket, then you will get a
blank cell.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top