View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
stevec stevec is offline
external usenet poster
 
Posts: 177
Default extract text between 2 tags

Cell A1 contains the text below.

In Cell B1, how do extract all the text between <status and </status so it
returns "error"

another example, how do I extract all the text between <comment and
</comment?

generally, how do I extract text that lies between 2 tags?

thanks a lot...



<apple2
<statuserror</status
<ack</ack
<errortypeCan't enter BTC - Not currently short</errortype
<comment<![CDATA[You can't enter an order to Buy To Close (BTC) because
you do not have a short position in BHP.
If you want to enter a BTC, make it conditional on a
not-yet-executed STO order. ]]</comment
</apple2