How make range of Hyperlinks?

  • Thread starter Thread starter Al Franz
  • Start date Start date
A

Al Franz

I see how to make a single cell into a Hyperlink but what if we want to have
all email and web addresses in a spreadsheet turn into hyperlinks? Is there
an easy way to turn this on and off?
 
Hi
for making hyperlinks in your selected range have a look at the
following macro:
Sub MakeHyperlinks()
Dim cell As Range
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
With Worksheets(1)
.Hyperlinks.Add Anchor:=cell, _
Address:=cell.Value, _
ScreenTip:=cell.Value, _
TextToDisplay:=cell.Value
End With
Next cell
End Sub


To remove them you may use
Sub DelHyperLinks()
Selection.Hyperlinks.Delete
End Sub
 
Back
Top