How to generate random numbers in Excel

Random numbers/entries in Microsoft Excel can be generated by using keyboard commands. Through random generation you can create samples in Excel that can then be used for further use like research.
This process is very useful and very easy. However, once you have taken out your sample your need to make sure that you freeze the data otherwise the entries in it will constantly keep on changing.
To learn how to generate random numbers in Excel follow the tutorial below.



Step # 1 – Enter the “=rand(“ command
Suppose you want to randomize your data. In order to do that, you need to generate a random list and sort the data according to that list.
Go to an empty column, type: “=rand(“ and then press the “enter” key
Use the “auto fill” function to fill in the rest of the column and then increase or decrease the decimal places to see the values properly.
Use the “=rand(“ command

Step # 2 – Generate random data
Next, go to the “data” tab and click on the “sort” button. Under the “sort by” option, choose “random” and then choose the order from highest to lowest or lowest to highest.
It doesn’t make a difference as its going to be random anyway. Press the “ok” button and your data will be randomized.
Create a random data list

Step # 3 – Create a sample data
In order to create samples in Excel type: “=RANDBETWEEN(5000,30000)
We want to generate sample data between these two values that’s why we have used them. You can choose any two values of your choice. Use the “auto fill” function to fill in the rows and columns.
Generate a sample data

Step # 4 – Freeze the data
You will have to freeze the data as it will change whenever you type something in the sheet. Select the data use your right mouse pointer at the edge of the selection and move it in any direction. Now come back to the original position and then release the mouse button. Choose the option of “copy here as values only”.
This way you can generate random numbers in Excel and create a sample data out of them.
Freeze your current data