I have exported a file from an Access query to Excel.
In the query, three of the fields are hyperlinks, but in Excel they show up as text. There are about 26,000 lines and I need to (as quickly as possible) convert them to actual hyperlinks. They are showing up as:
FriendlyLinkName# Actual Link
The macro I wrote to convert one column of links is below:
Dim AddressLink, FriendlyNameLink As String
For i = 2 To Columns("A").Find("").Row - 1
AddressLink = Right(Cells(i, 1), Len(Cells(i, 1)) - InStr(Cells(i, 1), "#") - 1)
FriendlyNameLink = Left(Cells(i, 1), InStr(Cells(i, 1), "#") - 1)
With Worksheets(1)
.Hyperlinks.Add .Range("C" & i), AddressLink, TextToDisplay:=FriendlyNameLink
End With
Next i
End Sub
This works, but it's time-consuming and the resulting file is huge. Any tips?
Thanks!
In the query, three of the fields are hyperlinks, but in Excel they show up as text. There are about 26,000 lines and I need to (as quickly as possible) convert them to actual hyperlinks. They are showing up as:
FriendlyLinkName# Actual Link
The macro I wrote to convert one column of links is below:
Dim AddressLink, FriendlyNameLink As String
For i = 2 To Columns("A").Find("").Row - 1
AddressLink = Right(Cells(i, 1), Len(Cells(i, 1)) - InStr(Cells(i, 1), "#") - 1)
FriendlyNameLink = Left(Cells(i, 1), InStr(Cells(i, 1), "#") - 1)
With Worksheets(1)
.Hyperlinks.Add .Range("C" & i), AddressLink, TextToDisplay:=FriendlyNameLink
End With
Next i
End Sub
This works, but it's time-consuming and the resulting file is huge. Any tips?
Thanks!