Google Sheets is a great tool for generating random numbers. You can use it to generate numbers in a variety of ways, including using the built-in function, rand(), or using a third-party function. To generate random numbers in Google Sheets, follow these steps:
- Open Google Sheets and create a new sheet.
- Type in the following code into the sheet: rand(1, 10)
- Click on theGenerate Random Numbers button.
- The sheet will print out some random numbers.
Google Sheets provides a simple function to generate random numbers inside your spreadsheet without having to leave the document or install an add-on. The function returns a random integer between two values. Here’s how to use it.
Fire up the Google Sheets homepage and open either a new or existing spreadsheet. For this guide, we’ll use the function RANDBETWEEN to produce a random number.
By default, the RANDfunction only generates a number between 0 (inclusive) and 1 (exclusive), whereas RANDBETWEEN lets you specify a range of numbers. While you could modify the function to generate other ranges, the RANDBETWEENfunction is a much simpler way to accomplish this.
RELATED: How Computers Generate Random Numbers
Click on a cell where you want to insert a random number and type =RANDBETWEEN(
For example, if you want a random number between 1 and 10, it should look like this:
After you fill in the range, press the Enter key. The random number will populate the cell where you entered the formula.
If you want to use a number from another cell in your spreadsheet, all you have to do is enter the cell number instead of a low or high number.
Note: Both RAND and RANDBETWEEN are considered volatile functions, meaning they don’t retain the data in the cell forever. So, when you’re using either of the functions, they recalculate a new number each time the sheet changes.
If you want to change the interval in which your random number is recalculated, open up File > Spreadsheet Settings, click on the “Calculation” tab, and then choose how often you want the function to recalculate from the drop-down menu.
You can select “On Change” (default), “On Change and Every Minute,” or “On Change and Every Hour.” Click “Save Settings” to return to your spreadsheet.