Convert entire columns of text email addresses to hyperlinks

  • Thread starter Thread starter TSA
  • Start date Start date
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
 
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
 
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
 
Back
Top