View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
michelle michelle is offline
external usenet poster
 
Posts: 310
Default Extract text within two specific values within a cell

I have a cell (D2) of wrapped text that contains two keywords: "NAME:" and
"CONSTRAINED". I want to extract all of the text between these two keywords
and paste it in cell L2.
I'm getting closer by using

=MID(D2,SEARCH("NAME:",D2),30)

to get the text that follows the first keyword "NAME:", but I am stuck now
trying to determine how to get the extraction to stop when the query reaches
the second keyword "CONSTRAINED".

Your help would be much appreciated