Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Copy Text String from between ()

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Copy Text String from between ()

try

=MID(A1,FIND("(",A1,1)+1,FIND(")",A1,1)-FIND("(",A1,1)-1)

" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Copy Text String from between ()

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

On Aug 22, 2:36 pm, wrote:
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumif text is contained winthin a longer text string in a cell Johnny M[_2_] Excel Worksheet Functions 3 March 21st 07 02:50 PM
Splitting a text string into string and number mcambrose Excel Discussion (Misc queries) 4 February 21st 06 03:47 PM
Copy a string text to cell if another cell not empty Pasmatos Excel Discussion (Misc queries) 0 November 25th 05 03:54 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM


All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"