Random Number Generator in Google Sheets [2023 Update]
In this article we will show you how to create a random number generator in google sheets in just a few clicks using the RAND function. Simply follow the steps below.
How to Make a Random Number generator in Google Sheets
1. Select a Cell to Place the Random Number Generator
Select the cell where you want to place the random number generator. You can format your spreadsheet in advance.

2. Insert the Formula =INT(RAND()*number) to the Selected Cell
We use the RAND function combined with to insert a random number generator to the selected cell. The syntax is
=INT(RAND()*number)
Where number is the largest number you want the random number generator to output and INT rounds off the output to the nearest whole number. For example, if you want the largest number to be 10, the formula will be:
=INT(RAND()*10)

When you press enter, the resulting output will be a random number ranging from 0 to 10.

The formula recalculates whenever you make any change in the contents of the sheet.

If you want the function to automatically recalculate, follow the next step.
3. Set RAND to Recalculate Every Minute or Hour
To set RAND to recalculate every minute or hour, change the recalculation settings of the sheet. Click File then select Settings.

A box labeled Settings for this spreadsheet appears.

Select the Calculation tab.

Click the drop-down list, then select On change and every minute or On change and every hour, whichever is the best for your need.

Click Save settings.

The RAND function will now recalculate every minute or every hour.
How to add a Google Sheets Random Number Generator Button
You can insert something close to a button so you can just click to generate a random number instead of trying to edit a cell just to make it generate new numbers. Here are the steps:
1. Insert Formula =INT(RAND()*number)
First, you need to insert the random number generator. The formula is straightforward:
=INT(RAND()*number)
Where number is the largest number you want the random number generator to output and INT rounds off the output to the nearest whole number. For example, if you want the largest number to be 10, the formula will be:
=INT(RAND()*10)
Format the sheet then select a cell where you want the formula placed.

Here is the result:

2. Select the Cell Where You Want the Button Placed
You can format your sheet to determine where to best place the button.

3. Click Insert then Select Checkbox
Once you select where to place the button, click Insert then select Checkbox.

You have now inserted a button! It’s not exactly a button but a checkbox. However, whenever you click the checkbox, you actually change the value of the cell containing it. Whenever you add a value or remove one from one of the cells, it forces the sheet to recalculate, making the RAND function give you a new value.

Here is a screencap to see that this trick works:
