If you used Gord's =hyperlink() technique, then you could use something like:
=HYPERLINK("mailto:"&A1)
(assumes that A1 contained something like (e-mail address removed))
And if you used Gord's macro, you could look for the @ sign:
Option Explicit
Sub MakeHyperlinks2()
Dim cell As Range
Dim myAddr As String
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
myAddr = ""
If InStr(1, cell.Value, "@") > 0 _
And LCase(Left(cell.Value, 7)) <> "mailto:" Then
myAddr = "mailto:" & cell.Value
ElseIf LCase(Left(cell.Value, 5)) <> "http:" Then
myAddr = "http://" & cell.Value
Else
myAddr = cell.Value
End If
If myAddr <> "" Then
With Worksheets(1)
.Hyperlinks.Add Anchor:=cell, _
Address:=cell.Value, _
ScreenTip:=myAddr, _
TextToDisplay:=cell.Value
End With
End With
Next cell
End Sub
But both of these hyperlinks will only open your default email client when you
click on them--they won't send the email.
Hi Gord,
I hope you don't mind me asking one more question. How can I get email addresses to do the same thing? If you wouldn't mind answering that, I would really appreciate it.
Thanks!
Mindy
----- Mindy wrote: -----
Gord,
Will you be on in a few hours if I need help doing this?
Mindy
----- Gord Dibben wrote: -----
Mindy
An easier way than the F2 and ENTER would be to add a helper column with
=HYPERLINK(A1) and drag/copy down the column. Assuming that the addresses are
in column A
Gord