Forum Discussion
luckycarman
Dec 09, 2020Copper Contributor
Seeking help for setting hyperlink as a batch
I've googled so hard and can't find an answer..... I got Column A (name of the link) and Column B (the URL). I need to create a hyperlink cell which i can simply click and jump to the website (see pi...
- Dec 09, 2020
I have modified the file and used '|' instead of space now you need to replace it.
Please refer the attached revised file in case you opt for non-VBA solution.
Thanks
Tauqeer
HansVogelaar
Dec 09, 2020MVP
Create and run this macro:
Sub CreateHyperlinks()
Dim r As Long
Dim m As Long
Application.ScreenUpdating = False
m = Range("A" & Rows.Count).End(xlUp).Row
For r = 2 To m
ActiveSheet.Hyperlinks.Add _
Anchor:=Range("A" & r), _
Address:=Range("B" & r).Value, _
TextToDisplay:=Range("A" & r).Value
Next r
Range("B2:B" & m).Clear
Application.ScreenUpdating = True
End Subluckycarman
Dec 09, 2020Copper Contributor
It works super well! Thanks a lot!