Learn How to Use the Excel Random Number Generator
Apr 13, 2023Are you looking for an easy way to generate random numbers in Excel?
Quickly generating random numbers can be invaluable for a data analysis project, a school assignment, or a job.
We know this skill's importance, so we made a guide to help you.
Here, we will discuss the following:
-
What is the Rand function?
-
What is the Randbetween function?
-
Final thoughts on the Excel random number generator.
-
Frequently asked questions on the Excel random number generator.
Read More: How to Use Excel’s IFERROR Function to Handle Errors in Formulas
What is the Rand Function?
The rand function is an Excel function created for generating random numbers in Excel. The Rand function returns a random decimal (real) number between 0 and 1.
RAND() is a function that creates a new random number every time you do something on the spreadsheet, such as updating a formula, changing something in a cell, or entering new data.
Enter =RAND() in a cell and then replicate the formula to the cells as you desire:
Set the upper limit for the range.
To generate random numbers mid zero and any N value, you multiply the RAND function by N, as shown in the image below.
Generate random numbers between two numbers.
Use the RAND formula shown in the formula bar in the image below to generate a random number between any two numbers you specify:
As shown in the image, 40 is the lower bound value, and 100 is the upper bound value.
Generate random integers using the Rand function.
To generate a random integer using the Rand function, use either of the same formulae from the earlier examples above and cover the Rand function by utilizing the INT function.
To generate random integers between 0 and 100:
=INT(RAND()*100)
To generate random integers between 100 and 40:
=INT(RAND()*(100-40)+40)
Read more: Excel AutoFill: How to Use the Fill Function to Automate Data Entry
What is the Randbetween Function?
Randbetween is another Excel function for generating random numbers. It places random integers in the range that you set:
=randbetween(lower limit, upper limit)
The lower limit represents the lowest random values; the upper limit represents the highest random values you will get from the Randbetween function.
Read more: Excel UDFs: How to Create and Use Custom Functions
Generate random numbers with desired decimal points.
The Randbetween function in Excel was created to return random integers, and you can force it to return random decimal numbers with as many decimal places as you want.
You need to multiply the lower and higher values by 20 to get a list of numbers with one decimal place. Then, divide the answer by 20.
Read more: How to Apply and Customize Cell Styles in Excel: A Beginner’s Guide
Final Thoughts on the Excel Random Number Generator
Now you've learned how to quickly generate random numbers in Excel, using the RAND and RANDBETWEEN functions to create and insert unique numbers into your worksheet.
Access our exclusive Simple Sheets Excel community and world-class PowerPoint university now! For more easy-to-follow guides, visit Simple Sheets and the related articles section of this blog post.
Subscribe to Simple Sheets on YouTube for Excel video tutorials.
Frequently Asked Questions on Excel Random Number Generator:
To generate unique random numbers in your spreadsheet:
-
Use between Rand and Randbetween function to generate random numbers.
-
Go to the Data tab.
-
Under the Data tools group, click the Remove Duplicates tool.
Is it possible to generate random values that are not integers?
It's possible to generate random values like dates, times, decimals, letters, text strings, and passwords.
Use the Paste Special Values options to stop changing the values of randomly generated numbers.
-
Select the data range with Rand or Randbetween formula, then copy.
-
Select a cell.
-
Right-click and click Paste Special, then Values.
Related Articles:
Know How To Calculate Margin Of Error In Google Sheets
What is a Formula Parse Error in Google Sheets? How to Solve Every Occurrence
Want to Make Excel Work for You?ย Try out 5 Amazing Excel Templates & 5 Unique Lessons
We hate SPAM. We will never sell your information, for any reason.