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
 

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