RANDBETWEEN Google Sheets Formula

What Is RANDBETWEEN In Google Sheets?

RANDBETWEEN function in google sheets is an inbuilt function used to find random values between two specified values. It is the same as RANDBETWEEN function in Excel. Users can use this function when there is a need to generate random integers.

For example, consider the below table showing values in cell A1 and B1.

Randbetween in Google Sheets - Intro

Now, let us find a random number in cell C1 using RANDBETWEEN function.

Select the cell where we have to find the result. In this example, it is cell C1. Next, insert the formula, =RANDBETWEEN( and select the arguments. Based on the data, we need to select the low as cell A1 and high as cell B1. Press Enter key. We can see google sheets readily providing a number in cell C1.

Randbetween in Google Sheets - Intro - Step 3.jpg

Likewise, we can use RANDBETWEEN function in google sheets.

In this article, let us learn how to use RANDBETWEEN google sheets formula.

Key Takeaways
  • RANDBETWEEN function is google sheets is used to create or generate random numbers in google sheets.
  • We need to provide the lowest and highest value in the formula to generate a value within the range provided.
  • The formula of RANDBETWEEN function in google sheets is =RANDBETWEEN(low,high) where both the arguments are mandatory.
  • The argument low marks the lowest value and the argument high indicates the highest value where the numbers will be generated.
  • Found under Math functions, this RANDBETWEEN function cannot be used with data having non-numeric values

RANDBETWEEN() Google Sheets Formula

The formula of RANDBETWEEN is

=RANDBETWEEN(low, high)

Randbetween in Google Sheets - Formula
  • Note that both the arguments are mandatory.
  • The argument low indicates the lowest value and the argument high marks the highest value.
  • The function gives a random number within the two specified values.

How To Use RANDBETWEEN Google Sheets Formula?

We can readily use RANDBETWEEN function in google sheets.

To use or insert RANDBETWEEN function formula in google sheets,

  • We can manually type =RANDBETWEEN(
  • Alternatively, we can select from the list of options that appears after we type =R.
  • Also, users can we can also choose RANDBETWEEN formula under the Math functions category in google sheets.

After inserting the formula, we can choose the values or cell references to fill the arguments.

Now, let us learn how to use RANDBETWEEN function in google sheets with detailed examples.

Examples

Example #1 – Generate Random Number Using RANDBETWEEN Function

Consider the below example where we need to generate random numbers.

Randbetween in Google Sheets - Example 1

Let us learn how to create random numbers using RANDBETWEEN function in google sheets.

The steps are:

Step 1: First, select the cell where we want to get the result. In this example, let us select cell C2.

Step 2: Next, insert the formula by entering =RANDBETWEEN( and select the arguments.

The formula is =RANDBETWEEN(A2,B2)

Randbetween in Google Sheets - Example 1 - Step 2 - formula

Step 3: Press Enter key.

We can see the result as shown in the below image.

Randbetween in Google Sheets - Example 1 - Step 3

Now, using Autofill option, we can find the result for the cell range C3:C6.

Randbetween in Google Sheets - Example 1 - Step 3 - Output

Likewise, we can find random numbers using RANDBETWEEN function in google sheets.

Example #2 – Generate Random Numbers In A Cell Range With RANDBETWEEN Function

Consider the below scenario where we have to enter values between 100 and 500 in the cell range A1:C3.

Randbetween in Google Sheets - Example 2

Let us learn how to create random numbers in cell range using RANDBETWEEN function in google sheets.

The steps are:

Step 1: First, select the cell where we want to get the result. In this example, let us select the cell range A1:C3.

Step 2: Next, insert the formula by entering =RANDBETWEEN( and select the arguments.

The formula is =RANDBETWEEN(100,500)

Randbetween in Google Sheets - Example 2 - Step 2

Step 3: Press Enter key.

We can see the result as shown in the below image.

Randbetween in Google Sheets - Example 2 - Step 3

Likewise, we can find random numbers for a cell range using RANDBETWEEN function in google sheets.

Example #3 – Generate Fraction Numbers Using RANDBETWEEN Function

Apart from numbers, we can also generate fractions in google sheets using RANDBETWEEN functions. Consider the below scenario where we have to find the fraction number between two values in the cell range A1:B1.

Randbetween in Google Sheets - Example 3 - Table

Let us learn how to create random fraction numbers between two values using RANDBETWEEN function in google sheets.

The steps are:

Step 1: First, select the cell where we want to get the result. In this example, let us select the cell reference C2.

Step 2: Next, insert the formula by entering =RANDBETWEEN( and select the arguments.

Remember that we have to multiple the RANDBETWEEN formula with RAND function.

So, the formula is =RANDBETWEEN(A2,B2)*RAND().

Step 3: Press Enter key.

Randbetween in Google Sheets - Example 3 - Step 3

We can see the result as shown in the below image.

Likewise, we can find random fraction numbers between two values using RANDBETWEEN function in google sheets.

Example #4 – Generate Random Dates Using RANDBETWEEN Function

In this example, let us learn how to use RANDBETWEEN function with DATE function to generate dates in google sheets.

Let us assume that we have to generate dates in the cell range A1:B2 between the years 2020 and 2023.

The steps are:

Step 1: First, select the cell where we want to get the result. In this example, let us select the cell range A1:B2.

Step 2: Next, insert the formula by entering =DATE( and enter the RANDBETWEEN formula.

Remember that we have to use the DATE function along with RANDBETWEEN formula to generate dates.

So, the formula will appear as shown below.

Example 4

Step 3: Enter 2020 and 2023 as the arguments for RANDBETWEN function as shown in the below image.

Example 4 - Step 3

Step 4: Similarly, enter the months, 1 and 12 as RANDBETWEEN function arguments. So, the function will appear as shown in the image below.

Example 4 - Step 4

Step 5: Finally, enter the dates, 1 and 31 as RANDBETWEEN function arguments to generate dates. So, the function will appear as shown in the image below.

Randbetween in Google Sheets - Example 4 - Step 5

Step 6: Press Enter key.

We can see the result as shown in the below image.

Randbetween in Google Sheets - Example 4 - Step 6

Likewise, we can find random dates between two specific years using RANDBETWEEN function in google sheets.

Important Things To Note

  • In google sheets, we can easily generate random numbers using RANDBETWEEN function, similar to the function used in Excel.
  • Remember, to specify the low and high numbers in the formula to get error-free results.
  • Meanwhile, note that this function works only for numbers and integers and not text.

Frequently Asked Questions

1. What is RANDBETWEEN function in Google sheets?

For example, consider the below table showing values in cell A1 and B1.

FAQ 1

Now, let us find a random number in cell C1 using RANDBETWEEN function.

The steps are:

Step 1: Select the cell where we have to find the result. In this example, it is cell C1.

Step 2: Next, insert the formula, =RANDBETWEEN( and select the arguments. Based on the data, we need to select the low as cell A1 and high as cell B1.

So, the formula is =RANDBETWEEN(A1,B1)

Step 3: Press Enter key.

FAQ 1 - Output

We can see google sheets readily providing a number in cell C1.

Likewise, we can use RANDBETWEEN function in google sheets.

2. Can we use RANDBETWEEN function with text?

RANDBETWEEN function in google sheets is categorized under Math functions and is used to generate random numbers. It can be combined with functions such as DATE function or nested functions but cannot be used to generate results with non-numeric values such as text.

3. What is the common mistake we can get while using RANDBETWEEN function in google sheets?

The RANDBETWEEN function is a simple function but users can get an error when

• Users don’t include the two mandatory arguments
• When the function is used for non-numeric values.

Download Template

This article must help understand the RANDBETWEEN Google Sheets formula and examples. You can download the template here to use it instantly.

This has been a guide to What Is RANDBETWEEN Google Sheets. Here we learn its syntax and how to use it to generate a random number along with detailed examples. You can learn more from the following articles –

Highlight Duplicates In Google Sheets

VAR.S in Google Sheets

Descriptive Statistics in Google Sheets

Reader Interactions

Leave a Reply

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