A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Extract Text Outside of Brackets



 
 
Thread Tools Display Modes
  #1  
Old February 10th, 2004, 11:01 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Extract Text Outside of Brackets

Hi
if you have only one textpart within brackets for each cell you may try
=LEFT(A1,FIND("[",A1)-1) & MID(A1,FIND("]",A1)+1,1024)
to get everything except the bracket text part
use
=MID(A1,FIND("[",A1),FIND("]",A1)-FIND("[",A1)+1)
to get the text within brackets

Frank

I want to extract all text inside a cell except for what is in
brackets [ DO NOT DELETE THIS TEXT WITHIN BRACKETS ] as shown here.

I am experimenting with functions like

=MID(A3,FIND("[",A3,1),100)

This returns

[ DO NOT DELETE THIS TEXT WITHIN BRACKETS ] as shown here.

but does not extract the "as shown here". I have many variations of
text within brackets, so the function has to detemine the length with
respect to the brackets.

Any help will be appreciated. Thank you.


---
Message posted from http://www.ExcelForum.com/



  #2  
Old February 10th, 2004, 11:02 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default Extract Text Outside of Brackets

This will extract what's in the brackets

=TRIM(LEFT(MID(A1,FIND("[",A1)+1,255),FIND("]",MID(A1,FIND("[",A1)+1,255))-1
))

if you want what's outside of the brackets

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

--

Regards,

Peo Sjoblom

"willik " wrote in message
...
I want to extract all text inside a cell except for what is in brackets
[ DO NOT DELETE THIS TEXT WITHIN BRACKETS ] as shown here.

I am experimenting with functions like

=MID(A3,FIND("[",A3,1),100)

This returns

[ DO NOT DELETE THIS TEXT WITHIN BRACKETS ] as shown here.

but does not extract the "as shown here". I have many variations of
text within brackets, so the function has to detemine the length with
respect to the brackets.

Any help will be appreciated. Thank you.


---
Message posted from http://www.ExcelForum.com/




  #3  
Old February 11th, 2004, 07:38 AM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Extract Text Outside of Brackets

Hi
thanks for the feedback
Frank

To: Frank Kabel & Peo Sjoblom

WOW ! Both of these solutions work great.

Thank you for the help.

Regards,


---
Message posted from http://www.ExcelForum.com/



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:44 AM.


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