# Google Sheets RANDBETWEEN Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/randbetween-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

The RANDBETWEEN function generates a random integer between two specified values, inclusive, for use in calculations or simulations.

```
RANDBETWEEN(low, high)
```

Generate FormulaExplain Formula

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Describe the RANDBETWEEN you need in plain EnglishGenerate Formula

## Parameters

**`low`**:\
The lower bound of the random number range. This is the smallest integer that can be returned by the function.

**`high`**:\
The upper bound of the random number range. This is the largest integer that can be returned by the function.

## What is RANDBETWEEN?

The *RANDBETWEEN* function in Google Sheets is a simple yet effective tool used to generate random integers between two specified values. This function is particularly useful for scenarios where you need to create random data, such as simulations, games, or testing purposes.

In simpler terms, RANDBETWEEN allows you to easily generate random numbers within a defined range, making it a handy function for various applications.

## A Practical Example

Imagine you are conducting a survey and want to randomly assign participants to different groups. You need to generate random group numbers for each participant.

### Participants Table:

| ParticipantID | GroupNumber |
| - | - |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |

You want to assign each participant a random group number between 1 and 3.

## RANDBETWEEN Formula

To achieve this, you would use the RANDBETWEEN function as follows:

```
=RANDBETWEEN(1, 3)
```

In this formula:

- `1` is the minimum value (the lowest group number).
- `3` is the maximum value (the highest group number).

## Result of the Formula

When you apply the RANDBETWEEN formula to the GroupNumber column for each participant, the output might look like this:

| ParticipantID | GroupNumber |
| - | - |
| 1 | 2 |
| 2 | 1 |
| 3 | 3 |
| 4 | 2 |
| 5 | 1 |

Each time you refresh the sheet or make any changes, the group numbers will change randomly, providing a new assignment for each participant.

## Why Use RANDBETWEEN?

RANDBETWEEN is beneficial because it simplifies the process of generating random numbers in Google Sheets. It eliminates the need for complex formulas or manual entry, allowing you to quickly create random data for testing or simulations. Additionally, it can be used in combination with other functions to enhance data analysis and modeling.

## Key Takeaways:

- **RANDBETWEEN**: A straightforward function that generates random integers between two specified values.
- **Easy to Use**: Simply specify the minimum and maximum values to generate random numbers.
- **Dynamic**: The generated numbers change with each recalculation, providing fresh data each time.
- **Common Use Cases**: Ideal for simulations, random assignments, testing scenarios, and any situation where random data is needed.

RANDBETWEEN is an essential function for anyone looking to incorporate randomness into their spreadsheets, making it a valuable tool for data analysis and experimentation.

Happy spreadsheeting!

## Example use case

You have a list of products in Column A and want to randomly select a discount percentage for each product in Column B. Using the RANDBETWEEN formula, you can generate a random discount between 5% and 30%, allowing for dynamic pricing strategies.

## Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Calculate Percentage In Google Sheets](https://betteranalyst.com/google-sheets/how-to-calculate-percentage-in-google-sheets)
- [How To Combine Two Columns In Google Sheets](https://betteranalyst.com/google-sheets/how-to-combine-two-columns-in-google-sheets)
- [How To Copy Formula In Google Sheets](https://betteranalyst.com/google-sheets/how-to-copy-formula-in-google-sheets)
- [How To Count Unique Values In Google Sheets](https://betteranalyst.com/google-sheets/how-to-count-unique-values-in-google-sheets)
- [How To Create A Pivot Table In Google Sheets](https://betteranalyst.com/google-sheets/how-to-create-a-pivot-table-in-google-sheets)
- [How To Divide In Google Sheets](https://betteranalyst.com/google-sheets/how-to-divide-in-google-sheets)
- [How To Enable Macros In Google Sheets](https://betteranalyst.com/google-sheets/how-to-enable-macros-in-google-sheets)
- [How To Filter In Google Sheets](https://betteranalyst.com/google-sheets/how-to-filter-in-google-sheets)

## Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

## Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

1. [01ChatGPTOpen a balanced comparison prompt in ChatGPT.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.
