+ Reply to Thread
Results 1 to 3 of 3

Associate name with email

Hybrid View

  1. #1
    jswafa
    Guest

    Associate name with email

    I have a column of names and a column of email addresses. Is there any way
    to merger them into a single hyperlink that shows the name and sends to the
    email address?

  2. #2
    Ron de Bruin
    Guest

    Re: Associate name with email

    Hi jswafa

    Try this : With the names in column A and the E-mail addresses in column B try this

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


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



    "jswafa" <jswafa@discussions.microsoft.com> wrote in message news:A69C7453-8B12-4444-AF64-3CB7742D91BE@microsoft.com...
    >I have a column of names and a column of email addresses. Is there any way
    > to merger them into a single hyperlink that shows the name and sends to the
    > email address?




  3. #3
    jswafa
    Guest

    Re: Associate name with email

    Worked great, Ron - thanks for the tip!

    "Ron de Bruin" wrote:

    > Hi jswafa
    >
    > Try this : With the names in column A and the E-mail addresses in column B try this
    >
    > Sub test()
    > For Each myCell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
    > If myCell.Value Like "?*@?*.?*" Then
    > ActiveSheet.Hyperlinks.Add Anchor:=myCell.Offset(0, -1), _
    > Address:="mailto:" & myCell.Value, TextToDisplay:=myCell.Offset(0, -1).Value
    > End If
    > Next
    > End Sub
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    >
    > "jswafa" <jswafa@discussions.microsoft.com> wrote in message news:A69C7453-8B12-4444-AF64-3CB7742D91BE@microsoft.com...
    > >I have a column of names and a column of email addresses. Is there any way
    > > to merger them into a single hyperlink that shows the name and sends to the
    > > email address?

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1