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)

Arguments

bottomThe lowest integer value you want as the result.
topThe highest integer value you want as the result.

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):

Additional Information

The RANDBETWEEN function is a great tool for generating random numbers within specified ranges. Remember that the generated numbers will change every time your worksheet recalculates. If you want to keep a specific random value, you can copy and paste it as a static value or use Excel’s “Paste Values” feature.

Tomasz Decker is an Excel specialist, skilled in data analysis and financial modeling.