Forum Discussion
What's the simplest way to make a genuinely random name selection system using Microsoft tools?
For example, suppose I have a list of participants in Excel and want to randomly select one winner without manually choosing from the list.
Would you use RAND/RANDBETWEEN in Excel, Power Automate, or another Microsoft 365 approach? I'm also interested in preventing the same person from being selected twice when several winners are needed.
I'd appreciate an approach that's easy for someone without much Excel or Power Automate experience to understand.
5 Replies
- SarahWilson1Brass Contributor
Excel is enough for this. The simplest method is to shuffle the entire list once, then take the first person or first few people. That avoids repeatedly drawing the same entry.
- Put the participants in column A, with a heading in A1 and one participant per row.
- In B1, enter Random. In B2, enter =RAND() and fill it down alongside the names.
- Select the random numbers, copy them, then use Paste Special > Values in the same cells. This freezes the draw so recalculation will not change it.
- Select both columns together, including the headings, and choose Data > Sort. Sort by the Random column, smallest to largest.
- The first name below the heading is your winner. For five winners, take the first five names.
Make sure each person appears only once before drawing. If two people share a name, use a participant ID or email to distinguish them rather than removing duplicates by name alone.
Save a copy of the frozen, sorted list as the record of the draw. This also lets you use the next person in order if a replacement winner is needed.
Excel’s RAND uses pseudorandom numbers, which are suitable for ordinary informal draws. It is not a certified lottery system. Power Automate only adds value here if you also need scheduled draws or automatic notifications.
- Olufemi7Steel Contributor
Hello AbdulWaheed3,
For a simple Excel-only solution, I would use RAND() if the list is intended to be easy for beginners to understand.
If the names are in A2:A21, add a random-number column:
=RAND()
Then sort the table by that column. The first 3 rows would be three different winners, so the same person cannot be selected twice in that draw.
If you're using Microsoft 365, you can also do it without a helper column:
=TAKE(SORTBY(A2:A21,RANDARRAY(ROWS(A2:A21))),3)
This returns 3 randomly ordered names from the list, without duplicates.
The main thing to remember is that RAND() recalculates, so the result can change when Excel recalculates the workbook. If the winners need to remain fixed, copy the resulting names and paste them as values after the draw.
- PeterBartholomew1Silver Contributor
A 365 formula that does the same thing is
= TAKE(SORTBY(names, RANDARRAY(20)), 3)(in this case selecting 3 distinct winners).
Life gets harder if you want the selection to remain unaltered until you specifically choose to select a new set of winners.
- PeterBartholomew1Silver Contributor
You ask for the simplest way, and this is not it, but it could be useful in that it updates only when the day changes.
= TAKE(SORTBY(names, PseudoRandλ(20,TODAY())),3) PseudoRandλ = LAMBDA(length, [seed0], // Written by Lori Miller LET( seed, IF(ISOMITTED(seed0), 123456789, seed0), case, SEQUENCE(length, , , 0) * {13, -17, 5}, rand, SCAN(seed, case, LAMBDA(s, i, BITXOR(s, BITAND(BITLSHIFT(s, i), 2 ^ 32 - 1)))), TAKE(rand,,-1) / (2^32) ) );A pseudo random sequence is determined by the choice of seed value and so is repeatable.
- Riny_van_EekelenPlatinum Contributor
AbdulWaheed3 I would just add a column to your list of names with =RAND(). This assigns a random number for each person. Press F9 to re-assign random numbers and then sort the list by number (ascending or descending). The first name(s) on the list is(are) your winner(s).