Excel for Statistics > How to Use the Random Number Generator in Excel

Watch the video or read the steps below:

You have two random number generator options in Excel: the RAND function (a variation is the RANDBETWEEN function) and the Data Analysis Toolpak.

### Random Number Generator: The RAND Function

Step 1: Type “=RAND()” into an empty cell.

Step 2: Press “ENTER.” This generates a random number between 0 and 1.

Step 3: Click the blue box at the bottom right of the cell to drag the formula up a column or across a row. This generates more random numbers.

### Random Number Generator in Excel: The RANDBETWEEN Function

Step 1: Type “=RANDBETWEEN(a,b)” into an empty cell, where a,b is the range you want to pick numbers from. For example, =RANDBETWEEN(1,100) will generate a random number between 1 and 100.

Step 2: Press “ENTER.” This generates a random number between the number you specified.

Step 3: Click the blue box at the bottom right of the cell to drag the formula up a column or across a row. This generates more random numbers.

### Data Analysis Toolpak

Step 1: Click the “Data” tab and then click “Data Analysis.” If you don’t see Data Analysis, load the Data Analysis Toolpak.

Step 2: Type how many columns you want to populate in the Number of Variables Box. For example, you might want to display 20 random numbers in 10 columns (2 random numbers per column); Type “10” into the box.

Step 3: Type how many random numbers you want in each column into the Number of Random Numbers box. In this example (2 numbers in 10 columns), type “2” into the box.

Step 4: Select a distribution. For example, select “Normal Distribution.”

Step 5: Type the remaining variables into the boxes. For example, for Normal Distribution type in the mean and standard deviation.

Step 6: Tell Excel where you want the output. For example, click the radio button next to “New Worksheet.”

Step 7: Press “OK.”

**Tip: **Enter a number into the Random Seed box if you anticipate needing the exact same set of numbers again. For example, type “99” into the box before pressing “OK.” The next time you run the random number generator, type 99 into the Random Seed box and Excel will display that same set of random numbers.

Check out our YouTube channel for more Excel/stats help and tips!

------------------------------------------------------------------------------**Need help with a homework or test question?** With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. If you rather get 1:1 study help, Chegg Tutors offers 30 minutes of free tutoring to new users, so you can try them out before committing to a subscription.

If you prefer an **online interactive environment** to learn R and statistics, this *free R Tutorial by Datacamp* is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try *this Statistics with R track*.

**Comments? Need to post a correction?** Please post a comment on our *Facebook page*.

Check out our updated Privacy policy and Cookie Policy