• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Popup (Note) on mouse / hover over?

Gregg Wolin

Member
Is there a way to have the text of a hyperlink popup (or a note) associated with a cell be based on the results of a lookup formula?
I'd like to have the date associated with a user-selected period (month#) appear when the mouse hovers over the cell. While I have seen a number of somewhat-related examples, none have gotten me across the finish line. I have attached a basic mockup for clarity.
 

Attachments

  • Popup with formula result.xlsx
    22.1 KB · Views: 6
One problem - when i change the value in the input(s), the value in the comment doesn't update. That's very important as these inputs are changed frequently
 
Gregg Wolin
... without the need to have a note for each cell
Of course, it's possible to have eg one note for all cells - would it be useful?
... by hyperlink ... aren't hyperlinks meant to use for links to somewhere - not for popups?

What are Your named input?
... one possible to add those manual inputs to same code - if input changes then update
or if Your named input are from other file, then there could be some other ways to solve this ... challenge.
 
Gregg Wolin
... without the need to have a note for each cell
Of course, it's possible to have eg one note for all cells - would it be useful?
... by hyperlink ... aren't hyperlinks meant to use for links to somewhere - not for popups?

What are Your named input?
... one possible to add those manual inputs to same code - if input changes then update
or if Your named input are from other file, then there could be some other ways to solve this ... challenge.
For some reason, the sheet you posted yesterday didnt update the note when i changed the number in the cell. When i just tried again, it DID. No idea why but thanks for your help.
 
One more follow up: What code should be added (and where) to make each note autosize to fit only the text? :)

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Select Case Target.Address
        Case "$H$4", "$H$6", "$H$8"
            Target.NoteText Format(Cells(3 + Target.Value, "C"), "mmm-yy")
    End Select
End Sub

Lastly - how do I make this code apply to all cells in a range. I was able to add additional cells to your Case statement (ie $H$10), however if i change it to "$H4:$H10," the macro doesn't work.
 
Last edited:
Gregg Wolin
to change ... that expects to press < Enter > or few other keys before it works.

Lastly -
change Case "$H$4", "$H$6", "$H$8"
to Case "$H$4" To "$H$10"
 
Back
Top