Home excel How to get the addresses of hyperlink from Excel cells?

How to get the addresses of hyperlink from Excel cells?




Table multiple links, but when I copy what’s in cells, I get the values:





How do I get links?

Answer 1

just like this (Copy / Paste ) will not work. But using the user function (UDF ).

Open the VBA project>(Alt + F11 ). In the general module, place a function:

function hyperget (RRNG AS RANGE) AS STRING
  With RRNG.
    If .hyperlinks.count then.
      Hyperget = .hyperlinks (.hyperlinks.count) .Address' address assigned link 'address'
      If Left $ (. Formula, 10) = "= Hyperlink" Then
        Hyperget = Mid $ (Split (.formula, ",") (0), 12) 'address links from the formula'
      End if
    End if
  End With.
End Function.

In the cell where you need to get the address of the hyperlink, write down the formula:

= hyperget (A2)

Instead of A2 , a link to the first range of the range from which the hyperlinks need to be obtained. Stretch the formula for rows.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions