ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Convert entire columns of text email addresses to hyperlinks (https://www.excelbanter.com/excel-worksheet-functions/9532-convert-entire-columns-text-email-addresses-hyperlinks.html)

TSA

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

Any help greatly appreciated



Ron de Bruin

Try this one for Column B in the activesheet

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"TSA" wrote in message ...
How do I convert an entire column of text only email addresses
to hyperlinks pointing to the same email address?

Any help greatly appreciated





TSA

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


"Ron de Bruin" wrote in message
...
Try this one for Column B in the activesheet

Sub test()
For Each myCell In

Columns("B").Cells.SpecialCells(xlCellTypeConstant s)
If myCell.Value Like "*@*" Then
ActiveSheet.Hyperlinks.Add Anchor:=myCell, _
Address:="mailto:" & myCell.Value, TextToDisplay:=myCell.Value
End If
Next
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"TSA" wrote in message

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

Any help greatly appreciated








All times are GMT +1. The time now is 10:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com