2

Thanks - I'm learning because of you

Thanks to the great posts and comments on stackoverflow, I've learned so many ways to enhance my use of Google Ads (my primary role) via the JavaScript-like Apps Script and now I've moved on to integrating with Google Sheets. Bravo stackoverflowers for your commitment to helping others!

Question

Is there any way to trigger a script attached to a Google Sheets document that would fire on hovering? We have a spreadsheet that contains tabs for the current month's online advertising budgets for a client by month. We duplicate the previous month's tab rather than just adding a column to the existing (previous month) tab because we sometimes added notes in a merged set of cells before we discovered how easy a popup HTML window could be implemented.

I cannot find anything in the scripts guides or via Google searches, but I am using a button that is prominent (just an inserted drawing attached to a script) that can be clicked to pop up an HTML file that explains the documents overall purpose.

Ideally, there would be something that displayed when hovering over a cell or button, but we could also live with something where a popup "speech bubble" would display on the entering of a cell.

Unfortunately, as we all know, there is no "onFocus" event.

With that in mind, are there any options that might accommodate hover, entering a cell but not changing the values, etc? Anything that might allow for tooltips, popups or other guidance to someone reviewing a spreadsheet without an accompanying text document.

Thanks in advance for reading - I've included a screenshot of the way I've currently implemented a per-sheet button that provides notes on specific changes for that tab.

Screenshot of Google Sheets with HTML popup and button displayed

player0
  • 124,011
  • 12
  • 67
  • 124

1 Answers1

2

Short answer: There aren't hover-like triggers but you could use notes or comments for showing a text related to a cell.

The docs about triggers are

An the related event objects are listed in

Here is how a cell with a "hidden" note looks

Here is how a cell and a displayed note looks

Cell notes could be inserted from the UI and by using Google Apps Script, i.e. setNote(note)

Related

Rubén
  • 34,714
  • 9
  • 70
  • 166