Excel + Google Sheets · RANDBETWEEN
Pick a random winner in one formula
RANDBETWEEN picks a random position and INDEX returns the name in it.
The formula
=INDEX(A2:A6, RANDBETWEEN(1, 5))What each part means
A2:A6The listRANDBETWEEN(1, 5)A random position
Example
| A | B | |
|---|---|---|
| 1 | Participant | Winner |
| 2 | @laura | |
| 3 | @joao | |
| 4 | @priya | |
| 5 | @tom | |
| 6 | @ana |
| A | B | |
|---|---|---|
| 1 | Participant | Winner |
| 2 | @laura | @priya |
| 3 | @joao | |
| 4 | @priya | |
| 5 | @tom | |
| 6 | @ana |
Step by step
- Click cell B2.
- Type the formula:
=INDEX(A2:A6, RANDBETWEEN(1, 5)) - Press Enter.
Where it works
- Every version of Excel
- Google Sheets
- Excel for the web (free)
The same formula in other languages
- English RANDBETWEEN
- Español ALEATORIO.ENTRE
- Português ALEATÓRIOENTRE