RAND In Google Sheets

What Is RAND In Google Sheets?

RAND function in Google sheets, as the name suggests, is used to generate the random numbers in the spreadsheets. It is available by default both in Excel and Google Sheets.

The RAND function in Google sheets helps users create or generate a random number between 0 and 1. The function is a sensitive, volatile function that changes every time the sheet is changed or whenever the sheet is opened. For example, consider the below table showing value in column A in Google sheets.

RAND-In-Google-Sheets-Definition

To begin with, we need to select the cell A2 and enter the RAND function formula in Google sheets, i.e., =RAND(). Press Enter key. We will be able to see the result in cell A2, as shown in the below image in Google sheets.

RAND-In-Google-Sheets-Definition-1

Likewise, we will be able to use the RAND function in Google sheets. In this article, let us learn how to use the RAND function in Google sheets with detailed examples.

Key Takeaways
  • RAND function in Google sheets is used to create random decimal values between 0 and 1.
  • The formula of RAND function in Google sheets is =RAND( where the only requirement is to press Enter key.
  • We will be able to see the RAND function under the Math function category and is available in Microsoft Excel too.
  • Remember, the RAND function generates decimal values between 0 and 1; whereas, the RANDBETWEEN function generates values between the specified two values in the spreadsheets.

Syntax

Syntax

The formula of RAND function in Google sheets is =RAND()

where the function generates a random number between 0 and 1.

How To Use RAND Function In Google Sheets?

We can use the RAND function in Google sheets in two different methods. They are:

  • Select the RAND function formula under the Insert tab
  • Manually enter the RAND formula directly

Method #1 – Select the RAND function formula under the Insert tab

The steps to use the RAND function formula under the Insert tab are:

Step 1: To begin with, we need to insert the data in the spreadsheets. Next, we need to click on the cell where we want to find the result.

Step 2: Next, select the Insert tab. Click on Function option.

Step 3: Then, click on the Math function category. Scroll-down to click on the RAND function in Google sheets, as shown in the below image.

Method-1-Step-3

Step 4: Now, we will be able to see the RAND function in Google sheets. Go to the next step.

Step 5: Press Enter key.

We will be able to see the result in the active cell in Google sheets.

Likewise, we will be able to use the RAND function in Google sheets under the Insert tab.

Method #2 – Manually enter the RAND formula directly

The steps to use the RAND function formula manually are:

Step 1: To begin with, we need to insert the data in the spreadsheets. Next, we need to click on the cell where we want to find the result.

Step 2: Next, type =R. Click on the RAND function option to insert the RAND function.

Method-2-Step-2

Step 3: Alternatively, we can also type =RAND directly. It is to insert the RAND function in Google sheets.

Step 4: Now, we will be able to see the RAND function in Google sheets. Go to the next step.

Step 5: Press Enter key.

We will be able to see the result in the active cell in Google sheets.

Likewise, we will be able to use the RAND function in Google sheets manually.

Examples

Now, let us learn how to use the RAND function in Google sheets with the help of the following examples.

Example #1

For example, consider the below table showing value in column A in Google sheets.

RAND-In-Google-Sheets-Example-1

Now, let us learn how to use the RAND function in Google sheets.

The steps to use the RAND function formula in Google sheets are:

Step 1: To begin with, we need to insert the data in the spreadsheets. In this example, the data is available in the cell range A1:B6. Next, we need to click on the cell where we want to find the result. In this example, we need to select the cell B2.

Step 2: Next, insert the RAND function in Google sheets formula.

So, the complete formula is =RAND(

Example-1-Step-2

Step 3: Press Enter key.

We will be able to see the result in the active cell B2, as shown in the below image in Google sheets.

Example-1-Step-3

Step 4: Now, using AutoFill option, we will be able to find the result in the cell range B3:B6, as shown in the below image.

Example-1-Step-4

Likewise, we will be able to use the RAND function in Google sheets and generate random numbers.

Example #2 – RAND With The VLOOKUP Function

For example, consider the below table showing sample, and quarter in columns A and B in Google sheets, respectively.

RAND-In-Google-Sheets-Example-2

Now, let us learn how to use the RAND function in Google sheets.

The steps to use the RAND function formula in Google sheets are:

Step 1: To begin with, we need to insert the data in the spreadsheets. In this example, the data is available in the cell range A1:B6. Next, we need to click on the cell where we want to find the result. In this example, we need to select the cell B2.

Step 2: Next, insert the VLOOKUP with RAND function in Google sheets formula.

So, the complete formula is =VLOOKUP(RAND(),A2:B5,2)

Example-2-Step-2

Step 3: Press Enter key.

We will be able to see the result in the active cell D2, as shown in the below image in Google sheets.

Example-2-Step-3

Likewise, we will be able to use the VLOOKUP and RAND function in Google sheets.

Example #3 – RAND With The SORT Function

For example, consider the below table showing name, sample, and result in columns A, B, and C in Google sheets, respectively.

RAND-In-Google-Sheets-Example-3

Now, let us learn how to use the RAND function in Google sheets.

The steps to use the RAND function formula in Google sheets are:

Step 1: To begin with, we need to insert the data in the spreadsheets. In this example, the data is available in the cell range A1:C5. Next, we need to click on the cell where we want to find the result. In this example, we need to select the cell B2.

Step 2: Next, insert the RAND function in Google sheets formula in cell B2.

So, the complete formula is = RAND(

Example-3-Step-2

Step 3: Press Enter key.

We will be able to see the random value between 0 and 1 in the active cell B2, as shown in the below image in Google sheets.

Example-3-Step-3

Step 4: Now, using the AutoFill option, we will be able to see the random values in column B, as shown in the below image.

Example-3-Step-4

Step 5: Next, we can use the SORT function formula in Google sheets in column C.

So, insert the SORT function in Google sheets in cell C2.

So, the complete formula is =SORT(A1:B5,2,True).

Step 6: Press Enter key.

We will be able to see the result, as shown in the below image.

Example-3-Step-6

Likewise, we will be able to use the RAND and SORT function in Google sheets.

Example #4 – RAND With The IF Function

For example, consider the below table showing sample and result in columns A and B, in Google sheets, respectively.

RAND-In-Google-Sheets-Example-4

Now, let us learn how to use the RAND function in Google sheets.

The steps to use the RAND function formula in Google sheets are:

Step 1: To begin with, we need to insert the data in the spreadsheets. In this example, the data is available in the cell range A1:B5. Next, we need to click on the cell where we want to find the result. In this example, we need to select the cell A2.

Step 2: Next, insert the RAND function in Google sheets formula.

So, the complete formula is =RAND(

Example-4-Step-2

Step 3: Press Enter key.

We will be able to see the result in the active cell A2, as shown in the below image in Google sheets.

Example-4-Step-3

Step 4: Now, using AutoFill option, we will be able to find the result in the cell range A3:A5, as shown in the below image.

Example-4-Step-4

Now, let us use the IF function with RAND function formula to find whether the data is more than or less than 0.5 in column A.

Step 5: So, insert the IF function formula in cell B2.

So, the complete formula is =IF(A2>0.5,”Yes”,”No”)

Example-4-Step-5

Step 6: Press enter key. We will be able to see the result in cell B2, as shown in the below image.

Example-4-Step-6

Step 7: Now, using the AutoFill option in Google sheets, we will be able to see the result in the cell range B3:B5, as shown in the below image.

Example-4-Step-7

Likewise, we will be able to use the IF and RAND function in Google sheets.

Important Things To Note

  1. RAND function in Google sheets helps users generate random decimal numbers between 0 and 1 in the spreadsheets.
  2. It is a default function used to create sample or data for calculations.
  3. Remember, we can use RAND function with a combination of formulas such as SORT, IF and VLOOKUP functions in Google sheets.

Frequently Asked Questions (FAQs)

1. Explain how to use the RAND function in Google sheets with a detailed example.

For example, consider the below table showing value in column A in Google sheets.
FAQ-1
Now, let us learn how to use the RAND function in Google sheets.
The steps are:
1: To begin with, we need to select the cell A2.
2: Next, enter the RAND function formula in Google sheets, i.e., =RAND().
3: Press Enter key.
We will be able to see the result in cell A2, as shown in the below image in Google sheets.
FAQ-1-Step-3
Likewise, we will be able to use the RAND function in Google sheets.

2. Why RAND function value keeps changing in Google sheets?

RAND function in Google sheets provides random decimal values between 0 and 1. This function is a sensitive function. In other words, it is a volatile function which generates new random values every time the sheet is altered or changed. Also, we will be able to see the change even if we close and open the sheet again.

3. What is the difference between RAND and RANDBETWEEN functions in Google sheets?

The difference between RAND and RANDBETWEEN functions in Google sheets are:
• RAND function creates random values between 0 and 1.
• RANDBETWEEN function generates random values between the given two values.

Download Template

This article must help understand the RAND In Google Sheets, with its formula and examples. You can download the template here to use it instantly.

Recommended Articles

Guide to What Is RAND In Google Sheets. We learn how to use it to generate a random number in different ways with step-wise examples. You can learn more from the following articles. –

Delta Symbol In Google Sheets

Highlight Every Other Row In Google Sheets

Columns In Google Sheets

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

CHATGPT & AI FOR MICROSOFT EXCEL COURSE - Today Only: 60% + 20% OFF! 🚀

X