title: Get explicit sheet hyperlink from cell VBA excel
body: <p>I am looking for a way to extract the hyperlink of an excel cell with hyperlink to another sheet in the same workbook. Is there a way to do it? In example:</p>
  
  <pre><code>Cell A1: "HPI" (with hyperlink to Sheet HPI)
  result -&gt; Cell B1: HPI
  </code></pre>
  
  <p>I found this formula but it's not working with reference to another sheet. </p>
  
  <pre><code>Function GetURL(cell As range, Optional default_value As Variant)
  'Lists the Hyperlink Address for a Given Cell
  'If cell does not contain a hyperlink, return default_value
   If (cell.range("A1").Hyperlinks.Count &lt;&gt; 1) Then
        GetURL = default_value
  Else
        GetURL = cell.range("A1").Hyperlinks(1).Address
  End If
  End Function
  </code></pre>