0% found this document useful (0 votes)
20 views

A Note On Excel Random Function

The RAND() and RANDBETWEEN() functions in Excel generate pseudo-random numbers from a uniform distribution for things like simulations and random sampling. RAND() returns a value between 0 and 1, while RANDBETWEEN() generates an integer within a range. These functions work across all Excel versions, though earlier ones had a small period of non-recurring sequences. Applications include generating random test data, integers, or values within an upper or lower bound.

Uploaded by

giercejjenowski
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

A Note On Excel Random Function

The RAND() and RANDBETWEEN() functions in Excel generate pseudo-random numbers from a uniform distribution for things like simulations and random sampling. RAND() returns a value between 0 and 1, while RANDBETWEEN() generates an integer within a range. These functions work across all Excel versions, though earlier ones had a small period of non-recurring sequences. Applications include generating random test data, integers, or values within an upper or lower bound.

Uploaded by

giercejjenowski
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

A note on Excel function “RAND( )”

What is a random number generator? In plain language, it is able to generate a


series of data which have equal chance to be selected. Such numbers are known
as pseudo-random numbers obtained through some mathematical formulae.

The MS Excel® “=RAND( )” function is one of the two commonly used to


generate a random decimal number from zero to one in an Excel cell. Another
one is “=RANDBETWEEN( )”, which generates a random integer in the range
specified. These random functions are available in all versions of Excel 2016,
Excel 2013, Excel 2010, 2007, 2003, XP, and 2000.

In fact, these two Excel random functions generate random numbers from the
rectangular or uniform probability distribution where there is equal chance for
all values that a random variable can take on. In theory, tossing an even six-
faced die for a very large number of times gives an outcome with six possible
values (1 to 6) and each of them is equally likely to occur.

It has to be highlighted here that prior to Excel 2003, the random generation
algorithm had a rather relatively small period, being less than a million non-
recurring random number sequence. It had failed some standard tests of
randomness. Since 2007 version, Excel has improved the function which is now
widely accepted and fine for many purposes. So, if you are still working on an
old Excel version, care must be taken not to use the RAND function with large
simulation models.

Applications of RAND( ) function


1. RAND( ) is said to be a “volatile” function because a number random
number is always generated each time we perform any action (like
updating a formula, editing a cell or enter a new data) on the
spreadsheet. To prevent the random numbers generated from changing
on every action taken on the spreadsheet, we can initiate a “copy and
special paste > value” action.

2. As said before, RAND( ) function has no arguments. It generates a


random number between zero and one when we type “=RAND( )” in a cell.

3. We can generate a series of random data by simply copying the first cell
with “=RAND( )” function and past it on other cells.
4. To create integer random numbers, we use “INT(RAND( )*N)” to produce a
series of integers from zero to a number less than N.

5. If we wish to generate a series of random number with an upper bound


value, we can use “=RAND( )*N” which produces a value between zero to
any number less than N. e.g., “=RAND( )*100” creates a sequence of
numbers 0 to less than 100.

6. If the upper bound requirement is to include 100, we need to use the


function “=RAND( )*101”, instead.

7. To generate random numbers between Upper (A) and lower (B) bounds,
we use “=RAND( )*(A-B)+B”. Take note that this random formula does not
return a number equal to the largest number (A) of the specified range.
A random number table shown below was generated by using the MS Excel®
function “=INT(RAND()*10000).

You might also like