Hello All,
I'm trying to create a series of Macros that take the contents of Column E, puts a direct hyperlink to website in question.
I just can't seem to find the code online to help me achieve what I want.
This is the code I have so far.
What I want it to do this this. There sometimes hundreds of rows involving multiple sheets
<tbody>
</tbody>
I'm trying to create a series of Macros that take the contents of Column E, puts a direct hyperlink to website in question.
I just can't seem to find the code online to help me achieve what I want.
This is the code I have so far.
Code:
Dim sh1 As Worksheet
Dim LastRow As Long
Dim c As Range
Dim hlink As String
Set sh1 = Sheets("Sheet1")
LastRow = sh1.Cells.Find("*", , xlFormulas, xlPart, xlByRows, xlPrevious).Row
For Each c In Intersect(Selection, Range("E2:E" & LastRow))
If c <> vbNullString Then
hlink = c.Value
ActiveSheet.Hyperlinks.Add Anchor:=c, _
Address:="http://fullpath.com/ordernum=" & hlink.Value, _
TextToDisplay:=c.Value
End If
Next c
What I want it to do this this. There sometimes hundreds of rows involving multiple sheets
E | |
1 | 500067521 |
2 | 500067522 |
3 | 500067530 |
... | 500067555 |
<tbody>
</tbody>