How to Generate Random Numbers in Excel (3 Different Ways)

How to Generate Random Numbers in Excel

From time to time, you might need to generate a set of random numbers. If this is the case now, then you’re in the right place.

This tutorial covers how to generate random numbers from 0 to 1, but not only that. We’re gonna have a look at how to generate random numbers within any range you define, whether you need to generate whole numbers or decimals.

Let’s give it a try now!

Would you rather watch this tutorial? Click the play button below!

How to Generate Random Numbers From 0 to 1

If you want to generate random numbers from 0 to 1, click into the cell you selected, then enter the equal sign and type in ‘RAND’. Click on the suggested function, enter an opening bracket and right after the closing bracket.

How to Generate Random Numbers in Excel - Suggested Function RAND

Now press Enter and Excel will generate a random number in the cell.

How to Generate Random Numbers in Excel - Random Number Generated

The number of decimal places can be adjusted at the top on the ribbon, in the section ‘Numbers’. Using the buttons ‘Increase-‘ and ‘Decrease Decimals’, you can add or remove decimal places just as you need.

How to Generate Random Numbers in Excel - ‘Increase-‘ and ‘Decrease Decimals’

If you want to generate more random numbers between 0 and 1, hover with the cursor over the bottom right corner of the cell where the function is located.

How to Generate Random Numbers in Excel - How to generate more random numbers between 0 and 1

Once you see the plus sign, click on the left mouse button and drag the function down to the last cell you want to populate. Like this.

How to Generate Random Numbers in Excel - Copy The Function

How to Generate Random Whole Numbers Within a Chosen Range

Now, let’s see how we can generate random whole numbers within a chosen range.

Again, select a cell and click into it. Enter the equal sign and type in ‘RANDBETWEEN’.

How to Generate Random Numbers in Excel - Randbetween upper and lower range

Excel will need two details – the upper and the lower bound of the range within which you want to generate random numbers.

How to Generate Random Numbers in Excel - Randbetween

Let’s say we want to generate random numbers within the range of 100 up to 1 000. Let’s set the lower bound first, which is 100, enter a comma and then type in the upper bound, which is 1 000. Close the brackets, hit ‘Enter’ and that’s all it takes.

How to Generate Random Numbers in Excel - Generate random numbers within the range of 100 up to 1 000
How to Generate Random Numbers in Excel - Generated Random Whole Number

If you need to generate more random numbers, simply copy the function to the rest of the cells by dragging down the bottom right corner of the cell.

How to Generate Random Numbers in Excel - Copy The Function

How to Generate Random Decimals Within a Chosen Range

And let’s have a look at how to generate random decimals within the range you need. As previously, we’ll use the range 100 to 1 000.

Click into the selected cell once more, enter the equal sign and here it comes – we need to use a slightly different formula that will help us generate these random decimals.

Enter the lower bound of the range, which is 100. Type in the plus sign and enter the number you get as the result of subtracting the lower bound value from the upper one.

This means that we will take 1 000, which is the upper bound of the range, and we will subtract 100 as its lower bound. The result is 900, so carry on typing 900 into the formula you’ve started and multiply it with the function ‘RAND’.

How to Generate Random Numbers in Excel - Random Decimals Formula

Hit ‘Enter’ and that’s it! Excel has generated a random decimal number within the range of 100 to 1 000.

How to Generate Random Numbers in Excel - Generated Random Decimal

Just like before, if you need more random decimals within the chosen range, you can copy the function to the rest of the cells using the steps you’re already familiar with.

How to Generate Random Numbers in Excel - Copy The Function

How to Generate Random Numbers Anew

And at last, let’s check out a little trick which can be useful when generating random numbers.

If you need to generate random numbers anew, you can simply refresh the formulas by going to the tab ‘Formulas’ and using ‘Calculate Now’.

How to Generate Random Numbers in Excel - Formulas Tab
How to Generate Random Numbers in Excel - Function Calculate Now

Thanks to this function, Excel will generate a new set of random numbers in all cells that contain the formula.

To copy the values of the random numbers, not the formulas, watch our video tutorial ‘How to Copy and Paste Values Without Formula in Excel’. Link to the tutorial’s been included in the list below.

And here’s a question for you: Which of the three ways will you use first? Let us know by leaving a comment in the comment section below. We can’t wait to hear from you!

Don’t miss out a great opportunity to learn:

If you found this tutorial helpful, give us a like and watch other video tutorials by EasyClick Academy. Learn how to use Excel in a quick and easy way!

Is this your first time on EasyClick? We’ll be more than happy to welcome you in our online community. Hit that Subscribe button and join the EasyClickers!

Thanks for watching and I’ll see you in the next tutorial!

Comments

Add comment

Your email address will not be published.

Your personal information will only be used for the purpose of processing this comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.