Forum Discussion
MicrosoftNewbie121
Feb 02, 2024Brass Contributor
Excel VBA - Hyperlink
Hello i would like please to add hyperlink to IDs column using VBA code, Basically the macro would go to IDs column and add this Link for every ID cell until last one. here is the exemple of the...
HansVogelaar
Feb 02, 2024MVP
Try this:
Sub AddHyperlinks()
Dim rng As Range
For Each rng In Range(Range("B2"), Range("B" & Rows.Count).End(xlUp))
ActiveSheet.Hyperlinks.Add _
Anchor:=rng, _
Address:="https://referential.fortesting.com/referential/Pages/" & _
"Components/Component.aspx?id=" & rng.Value & "&tab=Summary"
Next rng
End Sub
MicrosoftNewbie121
Feb 02, 2024Brass Contributor
It's working thank you so much 🙂