Trending September 2023 # Generate Random Numbers In Excel # Suggested October 2023 # Top 11 Popular |

Trending September 2023 # Generate Random Numbers In Excel # Suggested October 2023 # Top 11 Popular

You are reading the article Generate Random Numbers In Excel updated in September 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested October 2023 Generate Random Numbers In Excel

Introduction to Random Numbers in Excel

Generating random numbers in Excel is similar to rolling a die in Excel. Like a physical die, Microsoft Excel can generate random numbers in Excel that you can utilize for various purposes.

Excel has special functions called RAND and RANDBETWEEN that let you quickly generate random numbers. The RAND function gives you a decimal between 0 and 1, like 0.24 or 0.89. The RANDBETWEEN function gives you integers (whole numbers) between a specific range, like 24, 26, or 29.

Random numbers generated in Excel can help solve mathematical problems, simulate real-life scenarios, select random samples for analysis, and enhance encryption and security systems.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

How to Generate Random Numbers in Excel?

Let us understand how to generate a random number in Excel with the help of some examples.

You can download this Generate Random Number Excel Template here – Generate Random Number Excel Template

Method 1: Using RAND Function in Excel

The function RAND requires no arguments

Example #1: Generate Random Numbers in Excel Between 0 and 1.

To generate random numbers in Excel between 0 and 1, follow these steps:

Note: When we apply the formula repeatedly to the same cell, Excel generates a new random number each time.

Method 2: Using RANDBETWEEN Function in Excel

The RANDBETWEEN is a built-in function in Excel that generates a random integer between two given values.

“bottom” is the minimum value, and “top” is the maximum value of the range you want to generate random numbers between.

Example #2: Generate Random Numbers in Excel Between Specified Values

Suppose we want to create sample sales data with values between 100 and 200 to strategize marketing campaigns using the RANDBETWEEN function.

Method 3: Using INDEX and RANDBETWEEN Functions Together

We can use the INDEX and RANDBETWEEN functions to randomly select a value from a list or range of cells. Let’s see an example to understand it:

Example #3

The RANDBETWEEN will choose a random integer between 2 and 13 and pass the result to the INDEX function.

The INDEX function treats the integer as the row number and returns the corresponding data (here, the winner’s name).

Note: If you add or delete a name from the list, you must update the range in the formula accordingly.

How to Activate the Random Number Generation Feature?

In some scenarios, we want to use the same random numbers repeatedly; therefore, we activate the Random Number Generation feature in Excel to save time and effort.

To activate the feature, follow these steps:

It activates the Random Number Generation feature in Excel.

Step 8: The following parameters must be specified while using this functionality:

Number of Variables, as this would decide the number of columns used to display the result.

Several Random Numbers we wish to generate.

The distribution type we want to have for the numbers. It appears as a drop-down menu:

For Uniform distribution, we specify upper and lower limits as shown:

We may use Random Seed, which keeps the data centered on entered values. It helps generate the same set of numbers later.

You must specify the Output Range so Excel knows where to place the result.

Difference Between RAND AND RANDBETWEEN in Excel

RAND Function


Type of value It generates a decimal number (e.g., 0.54 ) It generates an integer

(e.g., 54)

Range of values Between 0 and 1 Between specified values

Syntax =RAND() =RANDBETWEEN(bottom,top)

Application You can use it to produce random numbers for simulations. You can use it to create randomized samples of data for analysis.


Can generate random numbers in Excel between 0 and 1 only.

It produces pseudo-random numbers, which are not indeed random.

It generates discrete integers, therefore, unsuitable for applications requiring a continuous range of values.

This function generates pseudo-random numbers.

Things to Remember for Generating Random Numbers in Excel

1. To prevent the random numbers from changing each time Excel recalculates a cell, convert them to static values using the paste special feature in Excel.

Example: Suppose you have a random number generated using the formula “=RAND()” in cell D1. To convert it to a static value, select cell D1, copy it (Ctrl+C), then use “Paste Special” and choose “Values” to paste the static value.

2. The likelihood of getting repeated random numbers using the RAND function is low, while that of RANDBETWEEN is high.

Example: If the RAND function generates five random decimal numbers, it will only give repeated values if you recalculate the worksheet. However, if the RANDBETWEEN function generates eight random whole numbers between 1 and 20, it may provide repeated numbers.

Frequently Asked Questions (FAQs)

Answer: To generate random integer numbers from 1 to 100, follow these steps:

Note: The random number will change each time Excel recalculates the cell or if there is an activity in the worksheet.

Generates only integer values: The RANDBETWEEN function can generate only integer values within the specified range; therefore, it is not helpful for situations requiring decimal values within a specified range.

No option to exclude specific values: The RANDBETWEEN function does not allow users to indicate values that are not required.

Potential for Duplicate values: When you use the RANDBETWEEN function to generate many duplicate values, there is a high probability of identical random values, making it unsuitable for situations where you need unique random values.

Answer: The RANDBETWEEN function is inclusive, including both the specified range’s lower and upper boundaries. For example, if you use the RANDBETWEEN function to generate random numbers in Excel between 1 and 10, it will consider both (1 and 10) numbers in the range of possible random integers.

Recommended Articles

The above article provides a comprehensive guide on generating random numbers in Excel, including practical examples and a downloadable Excel template. For additional resources, please refer to our other recommended articles-

You're reading Generate Random Numbers In Excel

Update the detailed information about Generate Random Numbers In Excel on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!