Nov 13 2023 08:49 AM
Good morning,
I have created a database that contains over 7,000 devices, each of these devices have several links that are attached.
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.
The problem is that now my database is extreamly slow. Is there any way to copy and paste the hyperlink without the formula?????
Nov 13 2023 09:14 AM
Nov 13 2023 10:24 AM
If i correctly understand you can use copy and paste only values (formula results, without formatting or comments).
Nov 13 2023 10:49 AM
Nov 13 2023 11:45 AM
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.
Active hyperlink with HYPERLINK formula before running the macro.