Forum Discussion

ChrisT72's avatar
ChrisT72
Copper Contributor
Feb 27, 2024

Hyperlinks within SQL data refresh Excel sheet

Hello, I'm testing a few things on a project. I have a worksheet that runs a SQL query and I have also included hyperlinks.  Obviously when the data is refreshed the hyperlinks drop out.   Is there a way to keep existing hyperlinks when the sheet is refreshed?

 

For example.  A particular cell contains some data "a specific code",  I want that particular cell with that "code" to include a hyperlink to another document on our server.   When the data is refreshed the data can move about, some "codes" will drop out (due to the query) and others may stay but move cell within the sheet.

 

Any help would be appreciated.

 

  • ChrisT72 You are missing the point. The Hyperlink function should use data from the returned table to build that link. That means there must be some logic you can use to derive the link text from the data in the table.

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor
    Add a column immediately to the right of your query table and use the HYPERLINK function to build that hyperlink. If all is set up the way it is supposed to, Excel will keep that hyperlink column when you refresh the query
    • ChrisT72's avatar
      ChrisT72
      Copper Contributor

      JKPieterse 

       

      Many thanks for the reply.  However I need the Hyperlink to be 'linked' to specific data returned in the query table.  See my example, if that makes sense.

       

      The column added immediately to the right does remain once the sheet is refreshed however the hyperlink does not correspond to the data returned.

      • JKPieterse's avatar
        JKPieterse
        Silver Contributor

        ChrisT72 You are missing the point. The Hyperlink function should use data from the returned table to build that link. That means there must be some logic you can use to derive the link text from the data in the table.

Share

Resources