ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Format email addresses? (https://www.excelbanter.com/new-users-excel/114300-format-email-addresses.html)

Steve

Format email addresses?
 
Is there any way to format a column of email addresses, so if I click
on an address it will open up a new message in my email client?


--

The government is unresponsive to the needs of the little man.
Under 5'7" it is impossible to get your congressman on the phone.

....Woody Allen

Ron de Bruin

Format email addresses?
 
Hi Steve

You can run this macro for column A

Sub test()
For Each myCell In Columns("A").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

Or insert a column with formulas

=HYPERLINK("mailto:" & A1,A1)

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



"Steve" wrote in message ...
Is there any way to format a column of email addresses, so if I click
on an address it will open up a new message in my email client?


--

The government is unresponsive to the needs of the little man.
Under 5'7" it is impossible to get your congressman on the phone.

...Woody Allen




Steve

Format email addresses?
 
"Ron de Bruin" wrote:
Is there any way to format a column of email addresses, so if I click
on an address it will open up a new message in my email client?


Or insert a column with formulas
=HYPERLINK("mailto:" & A1,A1)


Thanks Ron, that works great!


--

The government is unresponsive to the needs of the little man.
Under 5'7" it is impossible to get your congressman on the phone.

....Woody Allen


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

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