Generating Random Numbers by using Data Analysis Tool


Excel worksheets can become extensive, containing countless rows and columns of data. In this article, we will explore creative techniques that allow us to swiftly create random numbers through Analysis toolpak. Users can easily develop the nonconsecutive numbers and conduct some experiments on that data. We may generate random numbers using various methods like the Data Analysis option, the built-in RAND() function, and the user-defined function in VBA.

Example 1: Creation of Random Numbers through the Data Analysis tab

Step 1

The user must open a new worksheet in Excel like this −

Step 2

Switch to the "Data" tab and click on the "Data Analysis" option as shown in below image −

Step 3

Choose the "Random Number Generation" option from the drop-down menu and then click on the OK button.

Step 4

Another dialog box named "Random Number Generation" is to be displayed. Fill up the entries in the given textboxes one by one −

  • Enter the number 2 in the front of the "Number of Variables:" label which means random numbers are to be filled in the two columns (A and B).

  • You must specify the number of random numbers which need to be developed. Here we are creating only 15 random numbers.

  • Select the "Uniform" distribution from the drop-down menu. Users may select any of the distributions like Normal, Bernoulli, Poisson, and so on.

  • In the Parameters section, users must specify the minimum and maximum range of random numbers. The generated random numbers are to be created in that range only.

  • Random Seed is an optional parameter. If users intend to use the same random numbers next time. In this case, a random seed option would be required.

  • Click on the "Choose the New Worksheet Ply:" radio button to display the output in the new worksheet.

Step 5

Therefore, the random numbers are embedded in the first two columns as shown below screenshot −

Conclusion

Knowing how to rapidly create countable random numbers empowers you to save valuable time and enhance analytics skills. Quickly generating random numbers assists users when conducting extensive data analysis or manipulating multiple sheets within a workbook.

Updated on: 02-Nov-2023

143 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements