View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl carl is offline
external usenet poster
 
Posts: 42
Default Parsing Question

On Apr 1, 1:57*pm, "Rick Rothstein"
wrote:
Use this formula for retrieving the contents of the first bracket...


=TRIM(RIGHT(SUBSTITUTE(LEFT(A1,FIND("]",A1)-1),"[",REPT(" ",99)),99))


Actually, you can use this shorter and more efficient formula to do the same
thing...

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

Rick Rothstein (MVP - Excel)


Thanks Again.

I ran into a situation. In some cases, the 2nd set of bracketed data
could be 2 characters in length. Can you help me modify your formula
to cover this case ?