converting text into hyperlinks

B

barakooda

I have a list of 3000 URLs,
Each line contains URL in a text format.
I need to convert all the lines in one column - into hyperlinks.

How do I do it in Excel 2002?
Thanks!
 
L

Leith Ross

Hello Barakooda,

Add a standard VBA module to your project and copy and paste the
following code into it.


Code:
--------------------

Public Sub MakeHyperlinks(Optional Link_List As Range)

Dim Hlink As Range
Dim Wks As Worksheet

If Link_List Is Nothing Then
Set Link_List = Selection
End If

Set Wks = Worksheets(Link_List.Parent.Name)

For Each Hlink In Link_List
ActiveSheet.Hyperlinks.Add Anchor:=Wks.Range(Hlink.Address), Address:=Hlink.Value
Next Hlink

End Sub


--------------------


How to call the Macro:
Say your the range you want to convert into hyperlinks is A2 to A3002.


MakeHyperlinks Range("A2:A3002")

Or you can select the cells you want to convert to hyperlinks and run
the macro from the Macro List. To display the Macro List, press ALT +
F8.

Sincerely,
Leith Ross
 
B

barakooda

Leith said:
Hello Barakooda,

Add a standard VBA module to your project and copy and paste the
following code into it.
Code:
--------------------
Public Sub MakeHyperlinks(Optional Link_List As Range)

Dim Hlink As Range
Dim Wks As Worksheet

If Link_List Is Nothing Then
Set Link_List = Selection
End If

Set Wks = Worksheets(Link_List.Parent.Name)

For Each Hlink In Link_List
ActiveSheet.Hyperlinks.Add Anchor:=Wks.Range(Hlink.Address), Address:=Hlink.Value
Next Hlink

End Sub

--------------------

How to call the Macro:
Say your the range you want to convert into hyperlinks is A2 to
A3002.

MakeHyperlinks Range("A2:A3002")

Or you can select the cells you want to convert to hyperlinks and run
the macro from the Macro List. To display the Macro List, press ALT +
F8.

Sincerely,
Leith Ross

Dear Leith Ross,
Thanks for answering, and thanks a lot for elaborting!!
Cheers!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top