How do I hyperlink multiple cells on excel?

Hey guys! I have multiple websites typed on a excel spreadsheet, how do I hyperlink all of them other than doing it one by one?

Note: all of them start http://www./

Thanks :)

3 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    You could take some text that has the link and then cut and past it into each cell. Then when you click on that text you can start writing as a hyperlink. That would only work if you dont already have information.

    If you already have information, I bet your going to be stuck doing them one by one.

  • 1 decade ago

    If your URL's are in a column, say Column A, then this macro will convert them to hyperlinks. Change the "A1:A" to whatever column you are using, ie "C1:C", "F1:F:", etc.

    If your URL's are scattered across columns and the sheet contains ONLY URL's: Remove the apostrophe in front of line 7 and delete the two lines immediately above line 7.

    Open your workbook

    Copy this macro after modifying the macro range parameters:

    Sub ConvertToHyperlink()

    Dim rng As Range

    Set rng = Range("A1:A" & Cells _

    (Rows.Count, 1).End(xlUp).Row)

    'Set rng = ActiveSheet.UsedRange

    For Each cell In rng

    cell.Select

    If cell.Value <> "" Then

    If Left(cell.Value, 7) = "http://"/ Then

    URL = cell.Value

    Else

    URL = "http://"/ + cell.Value

    End If

    ActiveSheet.Hyperlinks.Add Anchor:=cell, _

    Address:=URL, TextToDisplay:=cell.Value

    End If

    here:

    Next

    End Sub

    Press ALT + F11

    Insert > Module

    Paste the macro into the Module area at the right.

    Close back to Excel

    Go to Tools > Macro > Macros

    Hightlight the ConvertToHyperlink macro, if not already highlighted.

    Click: Options

    Select a letter to use as a keyboard shortcut.

    Close back to Excel.

    Select the sheet with the URL's and press Ctrl + your shortcut letter.

  • ?
    Lv 4
    4 years ago

    Activesheet.hyperlinks.add

Still have questions? Get your answers by asking now.