title: Excel: retrieve hyperlink from an image in a cell
body: <p>In an Excel sheet (created by importing external data and images) are several cells that each contain different image and that image has a hyperlink. These cells containing images are all in one column.</p>
  
  <p>How can I retrieve that hyperlink from each image?
  The hyperlink is NOT retrievable from that cell.</p>
  
  <p>I've got a user-defined function that easily retrieves hyperlinks from any cell (if there is a hyperlink).</p>
  
  <pre><code>Function GetURL(rng As Range) As String
  On Error Resume Next
  GetURL = rng.Hyperlinks(1).Address
  End Function
  </code></pre>
  
  <p>This function can be placed anywhere.
  For example: In cell c25 the URL from a hyperlink in cell A1 must be listed.
  For that simply enter the following formula in cell c25.</p>
  
  <pre><code>=GetURL(A1)
  </code></pre>
  
  <p>That works just fine.</p>
  
  <p>However, if that cell A1 contains an image with a hyperlink, then the result is nil (or nothing). Even though the hyperlink is there as part of that image.</p>
  
  <p>Apparently the image is an object that needs to be addressed.
  How can this be done?</p>
  
  <p>Just found a <a href="https://stackoverflow.com/questions/22089216/extract-the-hyperlink-from-a-cell-with-image-content-on-excel-sheet">possible duplicate</a>. Unfortunately the answer didn't get me any further.
  Please add sample code.
  Thanks. </p>