In excel, you can link a hyperlink (to a cell, to a drawing etc)
We can say that these links are divided into two types:
- Hard Link This feature is implemented either by directly editing a cell or an object, i.e. by right-clicking and linking the link (to a place in the document, to a web page, etc.), or in VBA by calling the Add function of the Hyperlinks object
So this link is visible in the cell properties, and! visible in the Hyperlinks collection
- A dynamically generated hyperlink is a situation where a cell has a formula in the spirit of
=HYPERLINK(B2;A2)
A2 contains the display name, for example "Trade Minipigs" and B2 contains the actual address
For the user, everything works about the same as in the case of item 1, but it is no longer visible in the Hyperlinks collection
BUT! let's assume that the formula relies on cells on another sheet, they are still somewhere, with a cloud of checks and other things, in general complex, and we need to send someone this sheet with the final links (but not the sheets to which these generated links refer)
In this case, if you copy the sheet to a new file, the cell references in the formula will correct and point to the file from which the sheet was copied
It is clear that the recipient does not have such a file and these links will not work for him (however, in the part of the hyperlink itself, it does not work even in place, but the part associated with the display name works as expected)
The "Copy and paste" (values) operation will not help, because in this case the formula will be calculated in the part of the display name, but the resulting link will not be inserted (the same will happen when the link between the new file and the old one is broken)
That's what it is, that the" value " for the cell in which this formula is just a display name, but not a hyperlink, and it is also not in the cell properties The cell property hyperlink is a hard hyperlink
I think for sure where to the depths of the Excel object model this link is available After all, when you hover the cursor over such a cell, then yes, and the window pops up this hyperlink. However this is obvious.
Is it possible to somehow extract this generated link by software, so that later it can be bound to the desired location by the Add function of the Hyperlinks object?