I'm building a tool to randomize setup for a very large modular card game. There are several lists from which I need to select 2 to 6 non-duplicate entries, and each list is on a separate tab from the main randomizer.
I've been using this formula to get randomized selections:
=INDEX(Characters!A1:A, RANDBETWEEN(2,47))This forumla is copied into 5 different cells to randomize 5 different selections. The list is long enough that duplicates don't happen often, but they do happen. I can't find a way to prevent duplicate selections.
If I was doing this in Perl I'd define the list items into an array and then randomly pop out array entries; unfortunately I need this portable across a wide range of devices, not all of which support Perl, which is why I'm using Google Sheets to begin with. I see that there's an array command in Google Sheets but I can't quite parse the syntax. Is the array command the way I want to go? If so, can anyone suggest good resources to grok that? Or is there another way to do it?