Web Query / Link Copy

D

Dthmtlgod

I have a macro that grabs data off of the web. This works great.
The data comes across in pieces, so I need to put the data into a certain
format.

I have a macro that does this for me.
One of the cells is a link back to the webpage. I need to keep this.

I have a loop that grabs the data but it grabs the data but not the link. I
can do a copy and paste I guess, but not the way I want to go.

If Left(Range("Sheet1!I" & X), 1) = "F" Then
Range("Sheet2!J" & I).Value = Right(Range("Sheet1!I" & X), 3)
Range("Sheet2!E" & I) = Range("Sheet1!D" & X)

The last line is where the link is. I tried adding ".value", but it doesn't
work.

Any ideas?

TIA
 
D

Dick Kusleika

D

The best way to get a hyperlink is to copy the cell

Range("Sheet1!D" & X).Copy Destination:=Range("Sheet2!E" & I)
 
Top