View Full Version : Making URLS Hyperlinks
Hi
I have a spreadsheet with 200 URLS in and I would like to make them all hyperlinks, what is the fastest method to do this?
Cheers
Bob Phillips
07-21-2007, 08:21 AM
Sub AddHyperlinks()
Const TEST_COLUMN As String = "A" '<=== change to suit
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = 1 To iLastRow 'iLastRow to 1 Step -1
.Hyperlinks.Add Anchor:=.Cells(i, TEST_COLUMN), _
Address:=.Cells(i, TEST_COLUMN).Value, _
TextToDisplay:=.Cells(i, TEST_COLUMN).Value
Next i
End With
End Sub
Hi
I inserted it within the ThisWorkBook sheet but when I open it, nothing happens, any ideas.
Bob Phillips
07-21-2007, 08:33 AM
Doesn't go within ThisWorkbook, but in a standard code module. Then just run it.
Yep working now, thanks :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.