I'm using the GetURL code to retrieve URLs from hyperlinks:
I have two columns one for a selection of links and then a URL column with the =GetURL([@Link])
The code and formula works great when I use it over already established hyperlinks in the Link column. The issue I'm having is if I enter a new weblink in the Link column then the formula in the URL column beside doesn't update once I've pressed enter. I need to go back in to editing the cell either by double click or F2 and if I press enter than the URL column does update.
So I'm looking for that automation of when I enter a web address that the =GetURL formula triggers first time. Is this something that's possible?
VBA Code:
Function GetURL(cell As Range, Optional default_value As Variant)
If (cell.Range("A1").Hyperlinks.Count <> 1) Then
GetURL = ""
Else
GetURL = cell.Range("A1").Hyperlinks(1).Address
End If
End Function
I have two columns one for a selection of links and then a URL column with the =GetURL([@Link])
The code and formula works great when I use it over already established hyperlinks in the Link column. The issue I'm having is if I enter a new weblink in the Link column then the formula in the URL column beside doesn't update once I've pressed enter. I need to go back in to editing the cell either by double click or F2 and if I press enter than the URL column does update.
So I'm looking for that automation of when I enter a web address that the =GetURL formula triggers first time. Is this something that's possible?