How do I convert a column of text URLs into active hyperlinks in Excel?

后端 未结 22 2151
刺人心
刺人心 2020-12-07 07:42

I have a column in excel, wherein I have all the website url values. My question is I want to turn the url values to active links. There are about 200 entries in that column

22条回答
  •  -上瘾入骨i
    2020-12-07 08:10

    I had a list of numbers that feed into url's I want hotlinked. For example I have Column A with question numbers (i.e., 2595692, 135171) and I want to turn these question numbers into hotlinks and to display only the question numbers.

    So I built a text-only hyperlink pointing to Column A, and copied it down for all my question numbers:

    ="=HYPERLINK("&"""http""&"":"""&""&"&"&"""//stackoverflow.com/questions/"&A1&""""&","&A1&")"

    Then I copy - paste value this column of text hyperlinks to another column.

    You end up with a column of text that looks like the following:

    =HYPERLINK("http"&":"&"//stackoverflow.com/questions/2595692",2595692)

    Then I selected these pasted items and ran the F2Entry Macro that follows:

    Sub F2Enter()
    Dim cell As Range
    Application.Calculation = xlCalculationManual
    For Each cell In Selection
        cell.Activate
        cell = Trim(cell)
    Next cell
    Application.Calculation = xlCalculationAutomatic
    EndSub
    

    I then deleted the text entry column and Column A.

    I ended up with a single column of hotlinked question numbers:

    2595692

    135171

    etc.

    Cheers

提交回复
热议问题