SOLVED

Hyperlinks within SQL data refresh Excel sheet

Copper Contributor

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.

 

4 Replies
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

@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.

best response confirmed by ChrisT72 (Copper Contributor)
Solution

@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.

Yes I see now, makes sense. I am finance rather than IT so I have passed over to the guys that know what they are doing! Thanks
1 best response

Accepted Solutions
best response confirmed by ChrisT72 (Copper Contributor)
Solution

@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.

View solution in original post