RANDBETWEEN generates a random whole number between two values you specify — useful for sample data, simulations, and randomized selection.
RANDBETWEEN returns a random whole number between a minimum and maximum value you specify, inclusive of both endpoints.
It recalculates every time the spreadsheet recalculates, so the same formula produces a different result each time unless you freeze it.
=RANDBETWEEN(bottom, top)| Argument | Description |
|---|---|
| bottom required | The smallest possible value to return. |
| top required | The largest possible value to return. |
=RANDBETWEEN(1,100)Returns a random whole number anywhere from 1 to 100, inclusive.
=RANDBETWEEN(1000,5000)Quickly fills a column with plausible random sales figures for testing a spreadsheet model before real data is available.
=CHOOSE(RANDBETWEEN(1,3),"A","B","C")Combines with CHOOSE to randomly assign one of three labels.
RANDBETWEEN recalculates constantly — paste the result as a value if you need a fixed random number that does not keep changing.
ExcelPro has 700+ hands-on Excel exercises across 7 career tracks — free to start, no download needed.
Start practicing free →