Hi,
I recall Mynda using a function as the first parameter of a Hyperlink function to control a dashboard.
However, whenever I now try to replicate this I find the hyperlink shows ‘#value’. I’ve broken down what I recall of the method as far as I can and am using the functions and code shown below as tests. The code works and updates cell E1 to either “Updated” or “Cleared” as appropriate (I use the ‘cellupdated’ variable simply to stop the dostuff() function being called multiple times), but nothing I do will show the ‘friendly name’. I also tried to use the application.ontime function to clear the cell, but that never runs either.
I suspect its a limitation of the using Hyperlink this way, but I’d be grateful for any advice or direction to solve the problem.
The hyperlinks and the associated code are as follows:
In C4: =hyperling(dostuff(), “a Function”)
In C6: =hyperlink(doclear(),”doclear”)
Dim cellupdated As Boolean
Function dostuff()
If Not cellupdated Then
cellupdated = True
Range("E1") = "Updated"
End IF
End Function
Function doclear()
cellupdated = False
Range("E1") = "cleared"
End Function
Hi Peter,
You just need to wrap the HYPERLINKS in IFERROR because mousing over the link will generate an error.
=IFERROR(HYPERLINK(dostuff(), "DoStuff"),"DoStuff")
See attached.
regards
Phil
Thanks Phil, much appreciated - I wish I'd realised it was that simple. I'm learning. Many thanks.
No worries 🙂