dimanche 15 septembre 2019

Script for Selecting random data from a list on button press

I'm creating a spreadsheet which can automatically select random cell data from a particular column when I press a button. However, I cannot figure out the script.

Thanks to some friends I've tried a few variations that involve using add-ons but ideally I don't want to use anything like that as it needs to be usable if people wanted to make a copy without the addons.

What I'm looking to do is click a particular button and then the adjacent cell displays a random value from the data set given in the list.

I have two sheets. "Interface" and "Under the Hood" - Pretty self-explanatory, Interface has the buttons and Under the hood contains the data.

To throw an example out there -

A2-A33 is our data setlist (Under the Hood sheet)

I Have drawn a button and I would like the random selection to appear in cell D17 (interface).

Dummy Data: https://docs.google.com/spreadsheets/d/1HMmT_dx2_zeDKozEeDElYLaZutc4ruSwjjvVjyGg-Ls/edit?usp=sharing

Can anybody walk me through how to do this?




Aucun commentaire:

Enregistrer un commentaire