- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Generate Random Decimal/Integer Numbers in Excel?
Random numbers are the random values, used to obtain some results. It can be used to perform simulations and to understand the pattern of different system components. It is useful when the user requires a large data set to evaluate some common feature. Decimal numbers are numbers that contain some fractional part. For example, ,1.2, and 3.5 are decimal numbers. While integer data contain numbers without fractional parts. An example of integer value is 1,2,5, and many other, that does not contain a decimal value.
Example 1: To generate a random decimal number in Excel by using the predefined formula:
Step 1Consider the below-given data set. The provided table contains a column heading and some empty data rows.
In this example, the user is trained to use RAND() method. This method is used to generate a random number within Excel, without any need to write any formula or function. Simply call the method, with the range parameters to generate the random values.
Go to the C2 cell and type “=RAND()*100.00”. Consider depicted image −
After that press “Enter” key. This will display a random decimal value on sheet.
Example 2: To generate a random integer number in Excel by using the predefined formula:
Consider a worksheet, with a table that contains a column header “Random decimal”, with some empty data rows.
Again, use RAND() method to generate the integer data. Simply go to the C2 column and type “=RAND()*100” as highlighted in the below image.
After typing the formula and press the “Enter” key. This will print the required random number on the sheet.
Now, let’s round the obtained number as an integer value. To do so, go to the “Home” tab and then click on “Number” and select the “Decrease Decimal” option, as specified below:
This will round the number to an integer value as specified below:
Example 3: To generate random integer number in Excel by using kutool:
Consider an empty worksheet. Open the “Kutools” option tab. Click on the “Editing” option, and after that select the “Insert” option under the “Editing” section. Finally choose “Insert Random Data”, as depicted below:
This will open the below depicted “Insert Random Data” dialog box to the user:
Click on the “Integer” option. As, here user wants to generate random integer values.
Add data to “From” and “To” labels, and click on the “Ok” button, as specified below
After the successful completion of the above step, A random integer value from the selected range will be printed automatically to the active cell. Consider a snapshot of the Excel sheet to understand the generated output.
Example 4: To develop the random decimal number in Excel by using Kutool:
Consider an empty worksheet. After that go to the “Kutools” option. Click on the “Editing” option, and after that select the “Insert” option from the “Editing” section. Finally, choose “Insert Random Data” as highlighted in the below image.
This will open the below depicted “Insert Random Data” dialog box to user:
Click on “Decimal” tab. As, here user wants to generate random decimal values.
Add data to the “From” and “To” labels. This will act like the range. Here, the user can also able to select the possible decimal value. Let’s change the decimal value to 2 only. Finally, click on the “Ok” button, as specified below:
This will display a random decimal value to the active spreadsheet cell.
This article provides four examples to generate random decimal and integer values. The first two examples are based on the excel predefined formula. While the other two examples are based on the use of kutools.
Kickstart Your Career
Get certified by completing the courseGet Started