Web Page Hyperlinks/How do you make a list URL's active?

P

pglufkin

Web Page Hyperlinks/How do you make a list URL's active?

I have a whole list of many URL's in Excel and I would like to mak
them active links so that when you press on them, you go to thei
respective web page. I can do each one, one by one, by pressing F2 o
their respective cell and then pressing enter . . this makes the
active links, but its way too slow, I could never do all of them (som
pages have 15,000 links). Is there some sort of switch to make all o
my inactive URL's . . . active links at one time
 
R

Ron de Bruin

You can try this with the url in A

Sub test()
For Each myCell In Columns("A").Cells.SpecialCells(xlCellTypeConstants)
ActiveSheet.Hyperlinks.Add Anchor:=myCell, _
Address:=myCell.Value, TextToDisplay:=myCell.Value
Next
End Sub


If they start with ww you can use this
Address:="http://" & myCell.Value, TextToDisplay:=myCell.Value
 
D

David McRitchie

Possibly they are not links because they have spaces or a
non breaking space character (&nbsp:), or CHAR(160).
You might try the TRIMALL Macro if Ron's solution doesn't
work, or include the substitutions and TRIM within his macro.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Ron de Bruin said:
You can try this with the url in A

Sub test()
For Each myCell In Columns("A").Cells.SpecialCells(xlCellTypeConstants)
ActiveSheet.Hyperlinks.Add Anchor:=myCell, _
Address:=myCell.Value, TextToDisplay:=myCell.Value
Next
End Sub


If they start with ww you can use this
Address:="http://" & myCell.Value, TextToDisplay:=myCell.Value
 
Top