View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Printing what is between tags

Hi,
You can use "text" functions once it is written into a worksheet to pull out
what you want. This does not quite work, but you can experiment and get it,
if you see what is happeneing.

Assuming it is in "A1"
=MID(A1,FIND("http",A1,1),LEN(A1)-FIND("",A1,A2))

"Mark" wrote:

Hello, I curretly have some code to grab a line from a text document
that contains source code for a website. Anytime it sees a reference
to "href" it prints that entire line into a column, like the
following:

"
<P<STRONGExelon <BR</STRONGEthics Help Line <BRReport an
anonymous and confidential ethics concern<BR1-800-23-ETHIC
(1-800-233-8442)<BR<A href=""https://www.compliance-helpline.com/
welcomeExelon.jsp""Employee Ethics Web Site</A</P</span</P"

What I need tho, is just a part of that entire line, the <A
href:"...to be exact to make it look like this:

https://www.compliance-helpline.com/welcomeExelon.jsp.

Is there a way to reformat it after its been grabbed and printed into
the excel columns?