In this article:

# Random Number Generator in Google Sheets [2024 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:

Use our dental appointment reminders software to easily set up custom reminders from your spreadsheet in just a few clicks.

If you enjoyed this article, you might also like our article on how to find the mean on Google Sheets or our article on how to change column width in Google Sheets.

If you want to get a copy of our Google Sheets address book template, we also suggest checking out our detailed guide.

# Automate repetitive tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Trigger
Action
Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
ADDCALENDAREVENT
Creates a one- or multiple-day calendar event with optional attendees
ADDHUBSPOT
Adds an object to Hubspot
ADDSLACKCHANNEL
Create a Slack channel, and optionally add a topic or members
CALLURL
Makes any HTTP request
CREATEGOOGLEDOC
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
CREATEPDF
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
FETCH
Makes any HTTP request and returns the response
INSERTROWS
Inserts given array below defined values in given worksheet
SENDGMAIL
Sends an email using your Google account
SENDOUTLOOK
Sends an email using your Microsoft Outlook account
SENDSLACK
Sends a Slack message
SENDSMS
Sends an SMS message using your Twilio account
UPDATECELL
Updates cells with given values
UPDATEHUBSPOT
Updates a property of a Hubspot object
Trigger is required
Action is required