How to use the RAND formula in Google Sheets

Sheetgo logo Sheetgo logo

Automate your spreadsheet tasks with Sheetgo

Recommended for Workspace

In fields including but not limited statistics, science, gaming, cryptography etc. the use or random numbers is a commonplace. For instance, statisticians may use randomness in a randomized experiment to test their hypotheses. Because, a random number usually follows no predictable pattern, and this can help simulate real-life scenarios. Spreadsheets are the most common tools we can use for common data analysis purposes. They come with readymade mathematical and statistical functions that aid us along the way. And, the RAND formula in Google Sheets is the one that serves the randomness requirement.

 

Syntax

RAND()

Please note that this is a standalone function, and doesn’t require any inputs. It returns a value between 0 and 1, including 0, but excluding 1. Every time the spreadsheet recalculates, the RAND formula will generate a new value for output.

Usage: RAND formula in Google Sheets

Let us take a look as to how it behaves if we were to use the same RAND formula in a bunch of cells. We tried doing that on the Google Sheets application and here’s how it looks.

RAND formula 1

As expected, and as the name suggests, the same formula returned different outputs in a random manner. The values keep changing, every time the Google Sheets application recalculates the sheet.

There are numerous practical applications of the RAND formula in real-life scenarios. But, for the purposes of demonstration in this post, let us consider a simple case.

A school is conducting a soccer tournament with eight teams that do not have any particular rankings. So the tournament organizer has to make a random knockout draw to pit the teams against each other. He needs to allocate the teams to the positions 1 to 8 in no particular order. After which he will have the Team 1 play against Team 8, Team 2 play against Team 7. Similarly, he will draw Team 3 and Team 6 as opponents, and then Team 4 and Team 5 as opponents.

How exactly does the RAND formula come in handy here? It can help us allocate random values to each team. Following which we can sort the range (A2:B9) on the second column. Once sorted, we can give them their positions in a serial manner (column C). Now that we have the positions, the draw is made simple.

RAND formula 2

You may also like…