(Ultimate Guide) Create Random Numbers In Excel!

How to make random numbers In Excel

Looking for ways to generate precisely random numbers?

The Excel random number generator is your go-to tool.

There are two primary ways to generate random numbers in Excel, and here’s the ultimate guide to it.

You can learn more about the advanced functions of Excel on our award-winning Excel training courses.

What are Random Numbers in Excel?

What is meant by generating random numbers in Excel? By general definition, random numbers constitute a set of numbers that fit the following two conditions.

  1. Their values are evenly distributed within a defined range; and
  2. Upcoming values cannot be predicted by looking at the past or present values in the set.

If you are looking for a similar set of unique numbers, you may use one of the two methods to generate random numbers in Excel.

You can also use RANDARRAY to generate random numbers within an array!

How to Generate Random Numbers in Excel?

To generate random numbers in Excel, you may employ one of the two built-in functions of excel i.e.  RAND or RANDBETWEEN.

Though both the functions are more or less similar, they differ in a few aspects. Below is a detailed guideline into how both of these functions work.

1. The RAND Function

The RAND function enables generating an equally distributed real random number; the value whereof may lie anywhere between 0 and 1.

The value can be equal to or greater than zero, but less than 1. The RAND function includes no arguments and is written as follows:

>=RAND()

 

Let’s take a glance at the virtual application of this function.

Toggle to excel and in any cell, write in the function RAND() to get a random value somewhere between 0 to 1 as follows.

Generating random real numbers using the RAND Function

Need more than one random value? Just drag and drop to have a range of values as wide as you may desire.

Drag and Drop to create a list of random real numbers

Once you have your list ready, to delineate on your data set better, try adding simple borders to it.

Another easy way to yield a different set of Excel random number could be to select a range of cells containing random numbers and then press the ‘F9’ key. Every time you hit the F9 key, excel will generate a different set of random numbers for you without you having to re-enter the ‘RAND()’ formula over and over again.

Note: Every time a new random number is generated, the previously Excel generate random numbers also change.

In case you are linking these random numbers to multiple other worksheets and want all of them to regenerate uniformly, you may try linking the data to different sheets.

5 Uses of Random Numbers

While the reasons for generating such a set of numbers can be endless, here are a few reasons you may need one.

  1. Choosing a random winner for a competition
  2. Forming groups of random students in a class
  3. Generating a random list of numbers as sample data
  4. To perform data analysis and obtain a random result
  5. To select an unbiased sample from a given population

In short, you may use the random number generator function of Excel in any area where unpredictable and unbiased results are desired.

Difference between RAND and RANDBETWEEN

1 – Repetitive Values

With the RAND function, you would never see a repetitive value, but the random number generated will be between 0 and 1 only until and unless specified otherwise or combined with the RANK function to extract all sorts of random values. RAND Excel is one of the most used functions in Excel.

RANDBETWEEN function generates random number Excel of all kinds, but the only drawback is that you might experience repetitive values over and over again. It uses two arguments and generates values from within the limit given.

2 – Definite Values

RAND function specifies values between 0 and 1 only until you add an argument to the formula. But by default, it supports these two digits only.

RANDBETWEEN, however, can generate values between any two possible limits. Whether your arguments are 0 and 250 or 50 and 700, it will revert random numbers falling within the defined range.

3 – Regeneration of Values

The value regeneration feature is common to both the functions.

Every time a worksheet is calculated, a new random number would be generated in the cell containing the function. This means that both the formulas are volatile, and their values keep changing until the regeneration function is turned off.

4 – Location in the Function Library

You can find both these functions under the Function Library of the Formulas tab in the Ribbon.

Select either of the functions from the Math & Trig tab.

Final Thoughts:

Random numbers are often needed as a reference to construct a data set.

And Excel has a couple of functions to help you with that.

With the Excel random number generator functions, RAND and RANDBETWEEN:

Generating random numbers is easy, and with a little practice you will become a pro.

About Ben Richardson

Ben is a director of Acuity Training which he has been running for over 10 years.


He is a Natural Sciences graduate from the University of Cambridge and a qualified accountant with the ICAEW.


He previously worked as a venture capitalist and banker and so had extensive experience with Excel from building financial models before moving to learn SQL, Microsoft Power BI and other technologies more recently.