Hello everyone,
I am having problems optimizing some Excelsheets.
Usually we have a big sheet that logs inputs in a lot of different files, which are all formated the same.
All functions are pointed to a document (12 per line) and on the end is a hyperlink to the document. Then a numerical value is taken from there.
Everytime we reuse this ALL links have to be updated.
My idea is that instead I just check the field containing my hyperlink and let the functions work with that so I only have to update the hyperlinks.
==========================================================================================
Usual functions look like this:
=IF($T11<>"y";"-";'\\Link\to\document'!Field)
==========================================================================================
So far I´ve got this for vba:
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
'& "#" & cell.Range("A1").Hyperlinks(1).Subaddress
End If
End Function
==========================================================================================
My idea was to just do it like this:
=IF($T11<>"y";"-";getURL(U11; "Field"))
or
=IF($T11<>"y";"-";getURL(U11!Field))
Both just return the Link that the Hyperlinks points to instead of reading the desired value. Now I´m out of ideas.
I would really appreciate it if someone knew how to get this working since it would save a lot of people a lot of time.
Thank you and best regards,
Oliver
Bookmarks