• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
EDUCBA

EDUCBA

MENUMENU
  • Resources
        • Excel Charts

          • Histogram Chart Excel
          • Basic Excel Formulas
          • Text to Columns in Excel
        • Excel Charts
        • Excel Tips

          • Excel Gantt Chart
          • IFERROR with VLOOKUP
          • Data Table in Excel
        • Excel Tips
        • Excel Tools in Excel

          • Stacked Column Chart
          • Cheat Sheet of Excel Formulas
          • Excel Data Validation
        • Histogram chart in excel
        • Others

          • Resources (A-Z)
          • Excel Functions
          • Financial Functions in Excel
          • Logical Functions in Excel
          • Lookup Reference Functions in Excel
          • Maths Function in Excel
          • TEXT and String Functions in Excel
          • View All
  • Free Courses
  • All Courses
        • Certification Courses

          Excel Course 1
        • All in One Bundle

          All-in-One-Excel-VBA-Bundle
        • Excel course

          Excel-Training
        • Others

          • Excel advanced course
          • VBA Course
          • Excel Data Analysis Course
          • Excel for Marketing Course
          • Excel for Finance Course
          • View All
  • 120+ Courses All in One Bundle
  • Login

Random Numbers in Excel

Home » Excel » Blog » Excel Tips » Random Numbers in Excel

Generate Random Numbers in Excel

Excel Random Number (Table of Contents)

  • Generate Random Numbers in Excel
  • How to Generate Random Numbers in Excel?

Generate Random Numbers in Excel

This function has to be activated by enabling add-ins which we would discuss in this article. But first, let us look at a few examples of the function. The feature provides seven distribution types to generate numbers based on specified parameters. For starters, we open an excel file and click on any cell, then we have to input =RAND(). Excel is a versatile and powerful spreadsheet tool for many analytics tasks. One of these is a statistical analysis of data and it is a market leader in this field. Excel is able to run various statistical functions and one such example is the ability to generate random numbers in Excel workbooks.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

This generates a random number as seen below:

Generate Random Numbers

This is the most basic form of the RAND function and requires no argument to be written in the parentheses.

How to Generate Random Numbers in Excel?

Generating Random number in Excel is very simple and easy to use. Let us see how to generate a random number in excel with the help of some examples.

You can download this Generate Random Number Excel Template here – Generate Random Number Excel Template

We will take a look at more advanced examples in the following few paragraphs.

Generate Random Number in Excel – Example #1

To generate a list of random numbers: We can use the RAND function to generate a list of random numbers in Excel. It can be done by filling the first cell with =RAND() and dragging the fill handle till the cell we want as shown.

Example 1

We can copy and paste the values to a different column to make the RAND function go away and use the values as is the case with any excel formula.

Popular Course in this category
Excel Training (18 Courses, 9+ Projects) 18 Online Courses | 9 Hands-on Projects | 95+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.9 (2,671 ratings)
Course Price

View Course

Related Courses
Excel Data Analysis Training (12 Courses, 6+ Projects)Excel for Finance Training (15 Courses, 5+ Projects)

Generate Random Number in Excel – Example #2

To generate a list of random numbers between specified values: We can use the RAND function to generate a list of numbers between two specified values by using two different modifications of this function as shown below:

  • For a random whole number between two integers we use the function RANDBETWEEN:

Example 2

  • For a fractional number between two integers or fractions:

Example 2-1

Generate Random Number in Excel – Example #3

To generate a random set of values from a given list: We can use the RAND function to generate a set of values from a given list of strings, in this case, we would pick out random names from a list.

Example 3

To simplify this, we can change the reference style to default in the Excel menu. The INDEX function is combined with RANDBETWEEN for such cases.

What are RAND and RANDBETWEEN and where can they be useful?

The Excel RAND function can be used to generate a random real number in a uniform distribution of less than 1 and greater than or equal to 0 unless we specify the range. The RANDBETWEEN function always returns a random integer between two specified values.

Both these functions return random numbers with a single distribution. The numbers may or may not be in the upper or lower limit of the requested range. The uses of these functions range from analytics in marketing to quality control and forecasting.

Now that we have seen a few examples of the function RAND and RANDBETWEEN for random number generation, we will look at how to activate the features and enable these functions in Excel.

How to activate and use them?

We start by opening up excel and clicking on the File menu. Then we start by clicking on Options. This takes us to a screen as shown below:

Generate Random Numbers Step 1-1

After clicking on Options, we select the Add-Ins menu in the pop-up window that appears.

Select the Add-Ins

We select Analysis ToolPak.

Analysis ToolPak

After selecting the Analysis ToolPak, we click on Go in the Manage Tab.

Generate Random Numbers Step 1-4

This opens another pop-up window. In this screen, we can select only Analysis ToolPak, or select all and click on Ok.

Generate Random Numbers Step 1-5

Once we have activated the functionality, we can use it in two ways. One way as shown in the examples would be to use functions and formulae. The other more user-friendly graphical way is to use the Data tab as described below:

  • Click on Data in the Excel toolbar.

Generate Random Numbers Step 1-6

  • Click on Data Analysis on the far left of the toolbar.

Generate Random Numbers Step 1-7

  • This opens a pop-up window. Select Random Number Generation and click Ok.

Generate Random Numbers Step 1-8

  • This opens another pop up as shown below:

Generate Random Numbers Step 1-9

There are seven types of distribution available in excel for random number generation which are Uniform, Normal, Bernoulli, Binomial, Poisson, Patterned and Discrete distribution types. Any distribution can be chosen depending on the type of data we have. For this exercise, we are going to use Uniform distribution. The following parameters must be specified while using this functionality:

  • Number of Variables as this would decide the number of columns used to display the end result.
  • A number of Random Numbers we wish to generate.
  • The distribution type we want to have for the numbers. This appears as a drop-down menu:

Generate Random Numbers Step 1-10

  • For Uniform distribution we specify upper and lower limits as shown:

Generate Random Numbers Step 1-11

We may use Random Seed, which keeps the data centered on the values entered. This is useful for generating the same set of numbers later.

  • The Output Range should also be specified so that excel knows where to place the result. Click Ok.

Generate Random Numbers Step 1-12

We will see a result like this:

Generate Random Numbers Step 1-13

Conclusion – Generate Random Numbers in Excel

Since the usefulness of random number generation in excel depends a lot of our familiarity with statistics and distribution, the following is a short description of each distributions’ qualities:

  • Uniform: Any number between specified high and low values.
  • Normal: Mean and Standard deviation within a specified range.
  • Bernoulli: Probability of success on a given trial which is either 0 or 1.
  • Binomial: Probability of success for a number of trials.
  • Poisson: Lambda value which is a fraction equal to 1/Mean.
  • Patterned: Numbers have a lower and upper limit, a step, repetition rate for values and a repetition rate for the sequence.
  • Discrete: Has a value and probability associated with it, so uses two columns to display the results, the sum of probabilities should be 1.

As discussed above, we see that random number generation in excel is not just a set of random numbers, but like any data, has a pattern to it. It is these patterns that make it such a powerful analytics tool.

Recommended Articles

This has been a guide to Generate Random Numbers in Excel. Here we discuss how to generate random numbers in excel along with practical examples and downloadable excel template. You can also go through our other suggested articles –

  1. How To Use RAND Function in Excel?
  2. Guide To Excel ROW Function
  3. Best Examples Of SUMPRODUCT Function in Excel
  4. Excel CEILING Function

All in One Excel VBA Bundle (120+ Courses, 30+ Projects)

120+ Online Courses

30+ Projects

500+ Hours

Verifiable Certificates

Lifetime Access

Learn More

2 Shares
Share
Tweet
Share
Reader Interactions
Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar
Excel Functions Tutorials
  • Excel Tips
    • Excel Timesheet Template
    • Weighted Average in Excel
    • CTRL Shift-Enter in Excel
    • Excel Expense Tracker
    • INDEX MATCH Function in Excel
    • Shade Alternate Rows in Excel
    • Excel Database Template
    • Inverse Matrix in Excel
    • New Line in Excel Cell
    • Format Cells in Excel
    • Excel Text with Formula
    • Project Management Template in Excel
    • Vlookup vs Index Match
    • Embedded in Excel
    • Count Colored Cells in Excel
    • Excel Hacks
    • Column Header in Excel
    • Database Function in Excel
    • Excel Spell Check
    • Linear Interpolation in Excel
    • Convert Excel to CSV
    • Excel Not Responding
    • Delta Symbol in Excel
    • Excel Mortgage Calculator
    • Excel Show Formula
    • Break Links in Excel
    • VLOOKUP Examples in Excel
    • Alternate Row Color Excel
    • Checklist in Excel
    • Microsoft Office Tips
    • Excel vs Access
    • Excel Change Case
    • Count Characters in Excel
    • Formula Bar in Excel
    • Invoice Template in Excel
    • Find and Replace in Excel
    • PowerPivot in Excel
    • Wildcard in Excel
    • Line Break in Excel
    • NULL in Excel
    • Text Formula in Excel
    • Family Tree in Excel
    • Insert Calendar in Excel
    • Page Setup in Excel
    • Search For Text in Excel
    • Switching Columns in Excel
    • 3D Cell Reference in Excel
    • Roadmap Template in Excel
    • Cell References in Excel
    • Excel Automation
    • Matching Columns in Excel
    • Evaluate Formula in Excel
    • How to Find Mean in Excel
    • How to Add Cells in Excel
    • Project Timeline in Excel
    • TODAY Formula in Excel
    • Poisson Distribution in Excel
    • YEAR Formula in Excel
    • REPLACE Formula in Excel
    • Create Spreadsheet in Excel
    • SEARCH Formula in Excel
    • HYPERLINK Formula in Excel
    • Pivot Table with Multiple Sheets
    • COLUMNS Formula in Excel
    • DAY Formula in Excel
    • RIGHT Formula in Excel
    • INDIRECT Formula in Excel
    • Excel IRR Formula
    • Pivot Table Sort
    • OR Formula in Excel
    • Pivot Table Formula in Excel
    • How to Edit Drop Down List in Excel?
    • WEEKDAY Formula in Excel
    • Chart Wizard in Excel
    • Time Difference in Excel
    • Lookup Table in Excel
    • SUBTOTAL Formula in Excel
    • LOOKUP Formula in Excel
    • Themes in Excel
    • Group Worksheets in Excel
    • Excel ISNUMBER Formula
    • 3D Maps in Excel
    • VLOOKUP Tutorial in Excel
    • Moving Columns in Excel
    • Grouping Columns in Excel
    • Excel Formula of Percentage
    • Excel Leading Zeros
    • Timesheet in Excel
    • Nested IF Formula in Excel
    • SUMIF Formula in Excel
    • Concatenation in Excel
    • Excel Insert Page Break
    • LEN Formula in Excel
    • Insert Comment in Excel
    • Excel Print
    • Fractions in Excel
    • Excel Add a Column
    • Borders in Excel
    • Excel Sum by Color
    • Excel vs Google Sheets
    • Calculate Percentage Increase in Excel
    • Excel Format Phone Numbers
    • Excel Search Box
    • Excel vs CSV
    • Excel vs Numbers
    • Excel Concatenate Date
    • Excel Bullet Points
    • Calculate Compound Interest in Excel
    • Find External Links in Excel
    • Excel Comma Style
    • Excel Remove Leading Spaces
    • Combine First and Last Name in Excel
    • How to Calculate Ratio in Excel
    • SUMPRODUCT Function with Multiple Criteria
    • Create Excel Template
    • Excel Greater than or Equal
    • Excel Keyboard Shortcuts
    • Excel Row vs Excel Column
    • Excel Operators
    • Excel Text Compare
    • Excel Uppercase Function
    • Excel Auto Numbering
    • Watermark in Excel
    • Excel Delete Row Shortcut
    • Excel Word Count
    • Row Count in Excel
    • Excel Grade Formula
    • Excel Percentage Difference
    • Excel Rows and Columns
    • Excel Group
    • Excel Move Columns
    • Excel Row Height
    • Excel Sparklines
    • Excel Drawing a line
    • Multiple IFS in Excel
    • Excel Strikethrough
    • Numbering in Excel
    • Share Excel Workbook
    • Excel Shortcut For Merge Cells
    • Excel OneDrive
    • Excel Track changes
    • Excel Hide Formula
    • Excel Filter Shortcuts
    • Excel 3D Reference
    • Protect Excel Workbook
    • Excel Moving Averages
    • Excel Row Limit
    • Excel Absolute Value
    • Excel Print Area
    • Excel Format Painter
    • Excel Separate text
    • Excel Autofit
    • Excel Columns to Rows
    • Excel Paste Shortcut Option
    • Excel Rows to Columns
    • Excel Insert Row Shortcut
    • Excel Extensions
    • Excel Unmerge Cells
    • Divide in Excel Formula
    • Excel Compare Two Columns
    • Not Equal To Excel
    • Excel Remove Duplicates
    • Excel Remove Spaces
    • Excel Calculate Age
    • Copy Excel Sheet
    • Excel Conditional Formatting Based on Another Cell Value
    • Excel Cell Reference
    • Excel Split Cell
    • Excel Circular Reference
    • Highlight Every Other Row in Excel
    • Errors in Excel
    • Excel Delete Pivot Table
    • Excel Pivot Table
    • Subtraction in Excel
    • Count Unique Values in Excel
    • Excel Highlight Duplicates
    • Excel Data Formatting
    • Random Numbers in Excel
    • Basic Excel Formulas
    • Page Numbers in Excel
    • Excel CAGR Formula
    • Excel Combine cells
    • IFERROR with VLOOKUP in Excel
    • Column Sort in Excel
    • Print Comments in Excel
    • Cheat Sheet of Excel Formulas
    • Remove Hyperlinks in Excel
    • Excel Drop Down List
    • Remove (Delete) Blank Rows in Excel
    • Relative Reference in Excel
    • Subscript in Excel
    • Superscript in Excel
    • Excel Insert Multiple Rows
    • Excel Absolute Reference
    • Unhide Columns in Excel
  • Excel Functions (10+)
  • Excel Tools (97+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (12+)
  • Lookup Reference Functions in Excel (30+)
  • Maths Function in Excel (39+)
  • TEXT and String Functions in Excel (25+)
  • Date and Time Function in Excel (20+)
  • Statistical Functions in Excel (55+)
  • Information Functions in Excel (4+)
  • Excel Charts (44+)
  • VBA (180+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (14+)
  • Excel Formula and Functions (20+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • EXCEL COURSE
  • Online Excel Data Analysis Course
  • Excel for Finance Course
Footer
About Us
  • Who is EDUCBA?
  • Sign Up
  •  
Free Courses
  • Free Online Excel Course
  • Free Vba Course
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training
Resources
  • Resources (A To Z)
  • Excel Charts
  • Excel Tips
  • Excel Tools in Excel
  • Excel Functions
  • Financial Functions in Excel
  • Logical Functions in Excel
  • Lookup Reference Functions in Excel
  • Maths Function in Excel
  • TEXT and String Functions in Excel
  • Date and Time Function in Excel
  • Statistical Functions in Excel
  • Information Functions in Excel
Apps
  • iPhone & iPad
  • Android
Support
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions

© 2019 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

Download Generate Random Number Excel Template

By continuing above step, you agree to our Terms of Use and Privacy Policy.
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

Let’s Get Started
Please provide your Email ID
Email ID is incorrect

Limited Period Offer - All in One Excel VBA Bundle (120+ Courses, 500+ hours of Videos) View More

Limited Period Offer - Limited Period Offer - All in One Excel VBA Bundle (120+ Courses, 500+ hours of Videos) View More