1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
    1. Rate This Article
      0 votes
      Extracting the actual URl from the hyperlinks is very easy in Excel, you just have to define a simple function and done. Please follow these steps:

      1. Save the excel sheet as a Micro-Enabled Workbook

      2. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

      3. Click Insert > Module, and paste the following code in the Module Window.

      Function GetURL(cell As Range, _
      Optional default_value As Variant)
      If (cell.Range("A1").Hyperlinks.Count <> 1) Then
      GetURL = default_value
      GetURL = cell.Range("A1").Hyperlinks(1).Address & "#" & cell.Range("A1").Hyperlinks(1).SubAddress
      End If
      End Function
      4. Save the code and close the window, select a blank cell to type this formula =GetURL(E1) (E1 is the cell that the hyperlink in), and press Enter button. You can see the real hyperlink address is extracted.
  • Loading...