3 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Trying to create a "draft simulation" - a weighted random selection from a list with zero repeats

I have a list of 2380 names, a weighted random assortment of which I would like drafted to 55 groups over 25 rounds (I might reduce the number of draft rounds but the number of names and groups are set):

+ A
1 worker
2 CM Punk
3 Joe Anoa'i
4 Dwayne Johnson
5 Cody Rhodes
6 Tyler Black
7 Kazuchika Okada
8 ...

Table formatting by ExcelToReddit

I have a very basic understanding of Excel. After some searching, the most promising direction I thought would be the best to explore was to divide the names into weighting buckets according to this post:

=IFS(F2<500, 0.05/968, F2<1000, 0.15/1280, F2< 1400, 0.3/119, F2>=1400, 0.5/13)

In other words, 50% of the time, one of 13 names should be picked; 30% of the time, one of 119 names should be picked, 5% of the time, one of 968 names should be picked, and one of the remaining 1280 names should be picked 15% of the time. Then I make the cumulative probability series, and then generate a random name using XLOOKUP:

+ A B C
1 worker prob cumulative prob
2 CM Punk 0.038461538 0.038461538
3 Joe Anoa'i 0.038461538 0.076923077
4 Dwayne Johnson 0.038461538 0.115384615
5 Cody Rhodes 0.038461538 0.153846154
6 Tyler Black 0.038461538 0.192307692
7 Kazuchika Okada 0.038461538 0.230769231
8 ... ... ...

Table formatting by ExcelToReddit

=XLOOKUP(INDEX(UNIQUE(RANDARRAY(10, 1, 0, 1, FALSE)), SEQUENCE(10)), C:C, A:A , , -1)

Doing this successfully generates a list of 10 names that appears to properly choose based on the weights I've assigned, but duplicates do pop up. I thought about possibly generating a new list after every pick with

=FILTER(A2:A2381, A2:A2381 <> F2)

(where F2 is where I've chosen a single name with the above XLOOKUP formula) but I'm not sure how to generate a new cumulative probability series automatically to go along with it every time. This way is rapidly getting way out of my depth.

Searching further, the method described here seems promising for what I'm trying to do, but as I only have a license for Microsoft Office Home & Student 2021, I don't appear to have access to the MAP or LAMBDA functions.

submitted by /u/BoLevar
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#real-time data collaboration
#financial modeling with spreadsheets
#Excel compatibility
#rows.com
#natural language processing for spreadsheets
#generative AI for data analysis
#AI formula generation techniques
#cloud-based spreadsheet applications
#row zero
#draft simulation
#weighted random selection
#Excel
#names list
#groups
#draft rounds
#XLOOKUP
#cumulative probability
#probability series
#RANDARRAY