• Change Text to Hyperlink (Excel 2002 (XP))

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Change Text to Hyperlink (Excel 2002 (XP))

    Author
    Topic
    #421891

    I am looking for the easiest way to turn text in excel into a hyperlink.
    1. Change list of e-mail addresses into hyperlinks
    2. Change list of URLs into hyperlinks.

    I think this could be done fairly easily by bringing the data into an Access table and then changing the table definition to make the field type a hyperlink, but it seems that there should be an easy way to do this right in Excel.

    Viewing 0 reply threads
    Author
    Replies
    • #960192

      The following macro will change all cells in the selection to e-mail links or hyperlinks.

      Sub MakeLinks()
      Dim oCell As Range
      For Each oCell In Selection.Cells
      If InStr(oCell.Value, “@”) Then
      ActiveSheet.Hyperlinks.Add oCell, “mailto:” & oCell.Value
      Else
      ActiveSheet.Hyperlinks.Add oCell, “http://” & oCell.Value
      End If
      Next oCell
      End Sub

      • #960205

        Thanks Hans. Perfect and elegant as usual.

        I did find that the following formula works for the e-mail example:
        =HYPERLINK(“mailto:”&O8,O8)

        However, you end up stuck with two columns of data; the e-mail addresses and the hyperlinks. I couldn’t figure out a way to eliminate the formulas and just have the hyperlinked text.

        Thanks again.

    Viewing 0 reply threads
    Reply To: Change Text to Hyperlink (Excel 2002 (XP))

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: