If you need to generate random numbers in Google Sheets, there are a few different ways to do it. One way is to use the RAND() function. This function will return a number between 0 and 1,000,000. You can also use the RANDPOINT() function to generate a random integer between 0 and 2,147,483,648. ..


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(, ) but replace and  with the range in which you want the random number to fall.

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.