Pasting a hyperlink without the formulas

Copper Contributor

Good morning, 

I have created a database that contains over 7,000 devices, each of these devices have several links that are attached.

tylerx_0-1699893089940.png

While building this database I put several links in the wrong spot. I caught the mistakes, cleared the contents and pasted in the correct links.  Not sure how it happened but when i cleared the contents, the text cleared the cell but the link remained.  So when I pasted the correct link, it looked correct but it takes you to the wrong link.  I have created a formula that worked to replace all the links with the correct link. 

tylerx_1-1699893788582.png

The problem is that now my database is extreamly slow.  Is there any way to copy and paste the hyperlink without the formula?????

4 Replies
Sorry, this is the formula i used:
=IFERROR(HYPERLINK(url(INDEX(Sheet2!$J$2:$J$934,XMATCH('Eagle LSS Database'!K24,Sheet2!$J$2:$J$934))),'Eagle LSS Database'!K24),"")
Since there were blank cells that still had links, i had to use the formula for the cells with the links and the blank cells. It worked but now i have over 93,000 cells with this formula and i believe that is why it is slow.

@tylerx 

If i correctly understand you can use copy and paste only values (formula results, without formatting or comments).

Paste options - Microsoft Support

That is what I thought would work but all it does is paste the text with no link or formula. I have been at this for 3 days and tried paste options, formating cells, and extracting url's. Havent found an easy way yet

@tylerx 

I've found the below code in the www and it changes e.g.

=HYPERLINK("C:\Users\olive\OneDrive\Bilder\if.png")

to

C:\Users\olive\OneDrive\Bilder\if.png

and keeps the hyperlink active.

Sub Test()
    Dim Cell As Range
    For Each Cell In Range("D1:D10")
        With Cell
            .Value = .Value
            .Hyperlinks.Add .Cells(1, 1), .Value
        End With
    Next Cell
End Sub

The Range("D1:D10") can be changed according to the actual size of the data.

 

Active hyperlink without formula after running the macro.

hyperlink without formula.png

 

Active hyperlink with HYPERLINK formula before running the macro.

hyperlink.png