How to generate random numbers in Google Sheets

Google Sheets provides a simple function for generating random numbers in spreadsheets without leaving the document or installing add-ons. This function returns a random integer between two values. And this is how to use it.

Google Sheets provides a simple function for generating random numbers in spreadsheets without leaving the document or installing add-ons. This function returns a random integer between two values. And this is how to use it.

  1. 6 useful functions in Google Sheets you may not know
  2. How to use the AVERAGE function in Google Sheets
  3. How to sum across multiple Google Sheets

Open Google Sheets and open a new or existing spreadsheet. This tutorial will use the RANDBETWEEN function to generate random numbers.

By default, the RAND function only generates numbers between 0 and 1, while RANDBETWEEN allows you to specify a range of numbers. Although you can edit the function to create another range, the RANDBETWEEN function is a simpler way to generate random numbers.

Click on a cell you want to insert a random number and type = RANDBETWEEN (,) but replace and in the range you want to get a random number.

For example, if you want random numbers between 1 and 10, you use the following function:

 =RANDBETWEEN(1,10) 

Picture 1 of How to generate random numbers in Google Sheets

After entering the range of numbers, press Enter . Random numbers will fill in the cell you enter the formula.

Picture 2 of How to generate random numbers in Google Sheets

If you want numbers from other cells in the worksheet, you only need to enter the number of the cell instead of the high or low number.

Picture 3 of How to generate random numbers in Google Sheets

Note: Both RAND and RANDBETWEEN functions are considered as volatile functions, meaning they do not store data in the cell forever. Therefore, when using these functions, they will recalculate a new number each time the table is changed.

If you want to change the amount of time a random number is recalculated, open File> Spreadsheet Settings , click on the Calculation tab and then select the time you want the function to recalculate from the drop-down menu.

You can choose On Change (default), On Change and Every Minute , or On Change and Every Hour . Click Save Settings to return to the spreadsheet.

Picture 4 of How to generate random numbers in Google Sheets

I wish you successful implementation!

Update 06 November 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile