Articles Blog

How to use the Random Number Generator in Excel

How to use the Random Number Generator in Excel

This is Stephanie from,
and in this tutorial I will be showing you how to use the random number generator in
Excel. You have two options for generating random
numbers. The first is the RAND function and the second
is data analysis toolpak. The RAND function is pretty simple, equal
sign, RAND, open and close parentheses. Press the Enter key and excel generates a
random number between 0 and 1. If you want more than one random number you
can drag down the column or across a row. You can also use the RAND between function.
Open parentheses, say, I want to choose a random number between 1 and 100.
Press Enter, and there is my random number. And again I can drag down a column or across
a row to choose some random numbers. The data analysis toolpak is much more powerful.
Click the data tab, then click data analysis. If you do not see the data analysis on the
toolbar then you need to load the data analysis toolpak.
Click the link shown in the video right now and that will take you to a separate video that
shows you how to install the toolpak. Highlight random number generation and click
OK. In our Options windows, you can choose a number
of variables, that is the number of columns you want your data to appear in.
And the number of random numbers is the number of random numbers that will appear in each
column. So if we have 10 columns with 5 number or
random numbers then we will have a total of 50.
We can choose a uniform distribution. And if you want your numbers between 0 and
100. I am going to enter my data in a new worksheet.
Click OK. So I should have 50 random numbers between
0 and 100. You have got several other options on the
data analysis toolpak. Let us say I was studying IQ scores which
follow a normal distribution. And I want to select a say 20 random numbers
for IQ scores. Again I am choosing to have my data in 10
columns, I only need 20 numbers so I will put 2 numbers
in each column. Choose a Normal distribution.
Normal distribution has a mean of 100 and a standard deviation of 15.
You can type in anything you want there which fits your particular normal distribution data.
Random Seed, you should only use this if you need to generate the exact same data set at
a later time. For example, I could put in 99 and if I repeat
this random number generation with 99 in Random Seed,
it will give me the same set of 20 numbers every time.
In most cases, you do not need to use that. Again, I am putting it in a new worksheet.
Click OK. And there is my 20 numbers taken from the
normal distribution for IQ scores. And the scores are in the 80’s to 145 which
is what we would expect for a normal distribution for IQ Scores.
That is how to generate random numbers in Microsoft Excel.
This is Stephanie from Visit us for more excel articles,videos and
How To’s.

2 thoughts on “How to use the Random Number Generator in Excel”

Leave a Reply

Your email address will not be published. Required fields are marked *