# RANDBETWEEN function

Excel RANDBETWEEN function generates a random integer between two specified numbers. It’s a useful tool when you need to create random data for testing, simulations, or games. This simple guide explains how to use the RANDBETWEEN function, making it accessible even to high school students.

## Syntax

RANDBETWEEN(bottom, top)

## How to Use

The RANDBETWEEN function is simple to use. You need to specify the lower and upper limits for the random integer you want to generate. Here’s a step-by-step guide with examples:

1. Start with an empty cell where you want the random number to appear.

2. Enter the formula:

3. Replace “bottom” with the lowest integer you want and “top” with the highest integer you want.

4. Press Enter, and Excel will generate a random integer between your specified range.

For example, if you want a random number between 1 and 100, your formula will look like this:

Every time you recalculate your worksheet, the RANDBETWEEN function will provide a new random number within the given range. You can use this feature for various purposes, such as generating random test data, simulating dice rolls, or creating randomized game elements.

## Examples

Here are a few practical examples of how to use the RANDBETWEEN function:

1. Simulating a Dice Roll (1 to 6):

2. Generating a Random Percentage (0% to 100%):

3. Creating Random IDs (1000 to 9999):