Extracting a URL from hyperlinked text in Excel cell

前端 未结 8 2334
孤街浪徒
孤街浪徒 2020-12-17 23:43

I have a table full of Hyperlinked text in excel, so it\'s basically a bunch of names but when I click on one, it takes me to some URL in my default browser.

So I am

8条回答
  •  情书的邮戳
    2020-12-18 00:15

    You can use VBA code to achieve this. Press Alt + F11 to open VB editor, Insert a Module and paste the code below:

    Sub run()    
        On Error Resume Next    
    
        For Each hLink In Selection    
            Range(hLink.Address).Offset(0, 1) = hLink.Hyperlinks(1).Address    
        Next    
    End Sub
    

    Save your excel file[in excel 2007 and above save as macro enabled...]

提交回复
热议问题