Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2004
    Location
    Hampton, New Hampshire, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi All,

    I could use a little help here. I have a rather large excel file that has a column of email addresses that are all text. I need to convert them all to actual email hyperlinks so that when I click on them it fires up my outlook. Is there an automated procedure for doing this that will make my task easier. I am assuming that some sort of macro or vb script can be generated but that is a bit beyond my ability.

    Thanks for any assistance. I am attaching a sample.
    Attached Files Attached Files
    <font face="Comic Sans MS">MickeyMouse</font face=comic>
    How best to describe the Lounge-
    "Coming together is a beginning, staying together is progress, working together is success"

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The following macro should do what you want:

    Code:
    Sub Convert2Hyperlinks()
      Dim oCell As Range
      For Each oCell In ActiveSheet.UsedRange
    	If InStr(oCell.Value, "@") > 0 Then
    	  ActiveSheet.Hyperlinks.Add Anchor:=oCell, Address:="mailto:" & oCell.Value
    	End If
      Next oCell
    End Sub

  3. #3
    2 Star Lounger
    Join Date
    Jul 2004
    Location
    Hampton, New Hampshire, USA
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='795509' date='29-Sep-2009 11:49']The following macro should do what you want:

    Code:
    Sub Convert2Hyperlinks()
      Dim oCell As Range
      For Each oCell In ActiveSheet.UsedRange
    	If InStr(oCell.Value, "@") > 0 Then
    	  ActiveSheet.Hyperlinks.Add Anchor:=oCell, Address:="mailto:" & oCell.Value
    	End If
      Next oCell
    End Sub
    [/quote]

    Thank you Hans! That worked perfectly (of course)! As always the assistance provided here in the Lounge is the best.

    Here is a cold one for you! [attachment=85748:brewtime.gif]
    Attached Images Attached Images
    <font face="Comic Sans MS">MickeyMouse</font face=comic>
    How best to describe the Lounge-
    "Coming together is a beginning, staying together is progress, working together is success"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •