SO I have two tables: One a list of people (CHECKED IN), the second a list of prizes.
Pressing a button beside one of the prizes within the app assigns a random person to that prize.
index(
CHECKED IN[Key],
RANDBETWEEN(1, count(CHECKED IN[Key]))
Now I'd like to exclude previously selected people (keep the selections unique), but I've no idea how to begin this?
I assume your prize table contains a winner column where you are using this formula with the initial value. When the new prize is assigned, it's a new row.
You can do this for example like this..
INDEX(
Checked In[Key]-Prizes[Winner],
RANDBETWEEN(1,COUNT(Checked In[Key]-Prizes[Winner]))
)
User | Count |
---|---|
43 | |
28 | |
23 | |
14 | |
14 |