3
I want to fetch the URL from a cell which has this formula applied to it.
=HYPERLINK(CONCATENATE("https://loremipsum.com/#/Advertiser/",[@[Customer CID]],"/.html"), "View")
The formula has a structured reference to one of the columns in my sheet, 'Customer CID'.
When I try to apply this macro to my sheet it gives the default_value even when the formula is evaluating a correct URL.
Function GetURL(cell As Range, Optional default_value As Variant)
If (cell.Range("A1").Hyperlinks.Count <> 1) Then
GetURL = default_value
Else
GetURL = cell.Range("A1").Hyperlinks(1).Address
End If
End Function
But when I do not apply the formula and add a Hyperlink to the cell by right-clicking the cell, the macro funtion =GetUrl([@[Customer CID]], "")
works and gives me the URL.
Does anyone know how can I perform this task to fetch Hyperlink from a cell if that cell is evaluating the hyperlink from a formula ??
To permanently solve the
#VALUE!
errors, first select all the error cells (J2:J5
), making sure thatJ2
is the active cell. Then pressF2
. Then pressCtrl
+Enter
. – robinCTS – 2018-06-12T10:09:27.843In order to merge your accounts so that you can comment on and accept or otherwise edit your question you should use the contact form and select "I need to merge accounts".
– Mokubai – 2018-06-12T11:07:50.960