mercredi 27 mai 2020

randomly select value from list and remove that item from the list

Apologies, up front if this has been answered elsewhere. If so, please just point me to the correct thread.

I need a script that will randomly select a value from a set of 52 values stored in a Column (e.g. Column 'A') of a Google Sheet, paste that random value in a cell (e.g., 'C1'), and remove that value from the original set, thereby leaving 51 values in the column.

If you haven't guessed, I developing a card game that will let me randomly draw a virtual "card" from a virtual "deck of cards" (i.e, values in one column of a Google Sheet sheet (e.g., 'Ace of Clubs', 'Ten of Diamonds', etc.), that will simulate drawing (and removing) that card from the virtual deck.

Can someone please point me to a thread with the solution or provide the script that will do this?

Thanks, very much!




Aucun commentaire:

Enregistrer un commentaire