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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|