How make range of Hyperlinks?

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?
 
F

Frank Kabel

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
 

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