Insert a hyperlink as the text in the cell?

A

Alain Dekker

×

מיכ×ל (מיקי) ×בידן

For the same(!) range of cells [no helper-Column]:
Use the following VBA Code after the range of cells have been selected:
-----------------------
Sub Make_HyperLink()
For Each CL In Selection
If cl.Text Like "*www*" Then
ActiveSheet.Hyperlinks.Add Anchor:=cl, Address:= cl.Text,
TextToDisplay:=cl.Text
End If
If cl.Text Like "*@*.*" Then
ActiveSheet.Hyperlinks.Add Anchor:=cl, Address:= "mailto:" & cl.Text,
TextToDisplay:=cl.Text
End If
Next
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