The RANDBETWEEN function is used in Google Sheets to generate a random integer between two whole numbers.
This function returns a random integer between two specified amounts.
low– The lowest possible number of the random range
high– The highest possible number of the random range
RAND – Generates a random decimal
RANDARRAY – Generates an array of random numbers
Insert Math Symbols (Add-On)
Example Use of the RANDBETWEEN Function
The RANDBETWEEN function requires two inputs.
=RANDBETWEEN(3,87) into a cell returns a random integer between
87. In this case, the number is
Live Examples in Sheets
Go to this spreadsheet for examples, along with RAND and RANDARRAY that you can study and use anywhere you want.
- The output of RANDBETWEEN changes whenever the spreadsheet changes or reloads (like TODAY, NOW, RANDARRAY, and RAND).
- If you want the output to be static, consider using Copy and then Paste special as a value.
- Avoid using too many RANDBETWEEN functions in your spreadsheet, as it can slow it down with the extra recalculations.
- To force the random number to be recalculated more frequently, go to the File -> Settings -> Calculations, then change the setting from On change to On change and every minute or On change and every hour.