ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how can i make 2500 urls in an excel file hyperlinked quickly? (https://www.excelbanter.com/excel-worksheet-functions/46807-how-can-i-make-2500-urls-excel-file-hyperlinked-quickly.html)

M_E_Luft

how can i make 2500 urls in an excel file hyperlinked quickly?
 
I have an excell file with 2500 urls in it that were saved as plain text...i
need to hyperlink all of them but i don't want to do it 2500 times....does
anyone know a way to mass hyperlink several lines

Ron de Bruin

You can do this with the urls in column B

Sub test()
For Each myCell In Columns("B").Cells.SpecialCells(xlCellTypeConstant s)
If myCell.Value Like "http://www.*" Then
ActiveSheet.Hyperlinks.Add Anchor:=myCell, _
Address:=myCell.Value, TextToDisplay:=myCell.Value
End If
Next
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl


"M_E_Luft" wrote in message ...
I have an excell file with 2500 urls in it that were saved as plain text...i
need to hyperlink all of them but i don't want to do it 2500 times....does
anyone know a way to mass hyperlink several lines




Don Guillett

Instead, you might prefer to use a worksheet double_click event to goto the
url clicked on?

From vba Help indes for hyperlink and then selecting followhyperlink
ActiveWorkbook.FollowHyperlink Address:="http://example.microsoft.com", _
NewWindow:=Trueso right click sheet tabview codeinsert thisSAVEtype
in a url myurl.comdoubleclick on itPrivate Sub
Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
ActiveWorkbook.followhyperlink Address:="http:\\" & Target, NewWindow:=True
End Sub




Don Guillett
SalesAid Software

"M_E_Luft" wrote in message
...
I have an excell file with 2500 urls in it that were saved as plain

text...i
need to hyperlink all of them but i don't want to do it 2500 times....does
anyone know a way to mass hyperlink several lines




Don Guillett

three lines
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
ActiveWorkbook.followhyperlink Address:="http:\\" & Target, NewWindow:=True
End Sub


--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
Instead, you might prefer to use a worksheet double_click event to goto

the
url clicked on?

From vba Help indes for hyperlink and then selecting followhyperlink
ActiveWorkbook.FollowHyperlink Address:="http://example.microsoft.com", _
NewWindow:=Trueso right click sheet tabview codeinsert

thisSAVEtype
in a url myurl.comdoubleclick on itPrivate Sub
Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
ActiveWorkbook.followhyperlink Address:="http:\\" & Target,

NewWindow:=True
End Sub




Don Guillett
SalesAid Software

"M_E_Luft" wrote in message
...
I have an excell file with 2500 urls in it that were saved as plain

text...i
need to hyperlink all of them but i don't want to do it 2500

times....does
anyone know a way to mass hyperlink several lines







All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com