Convert entire columns of text email addresses to hyperlinks

T

TSA

How do I convert an entire column of text only email addresses
to hyperlinks pointing to the same email address?

Any help greatly appreciated
 
R

Ron de Bruin

Try this one for Column B in the activesheet

Sub test()
For Each myCell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If myCell.Value Like "*@*" Then
ActiveSheet.Hyperlinks.Add Anchor:=myCell, _
Address:="mailto:" & myCell.Value, TextToDisplay:=myCell.Value
End If
Next
End Sub
 
T

TSA

Works great!........Thanks!


Ron de Bruin said:
Try this one for Column B in the activesheet

Sub test()
For Each myCell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If myCell.Value Like "*@*" Then
ActiveSheet.Hyperlinks.Add Anchor:=myCell, _
Address:="mailto:" & myCell.Value, TextToDisplay:=myCell.Value
End If
Next
End Sub
 
Top