Skip to main content

How to generate random decimal/integer numbers in Excel?

Author: Sun Last Modified: 2024-10-09

To generate random numbers in Excel is usually used, maybe in some cases, you want to generate random decimal number, but in other cases, you need to generate random whole numbers. In this tutorial, I will introduce some ways of generating random decimal or random integer numbers in Excel.

Generating random decimal numbers with formula

Generating random decimal or integer numbers with Insert Random Data utilitygood idea3


Generating random decimal numbers

Generating random decimal numbers between 0 and 1

1. Select a blank cell, and type =RAND() into it, and then drag the fill handle to fill the range you need with the formula.
A screenshot showing the RAND function generating random decimal numbers between 0 and 1

2. Then select the range you have applied the formula, and click the Increase Decimal button or Decrease Decimal button under Home tab to specify the decimal numbers.

A screenshot showing the Increase Decimal and Decrease Decimal buttons in Excel

Generating random decimal numbers between 0 and X

To randomize decimal number between 0 and X (X indicates any maximun number you need), you can use this formula =RAND()*X. For instance, I want to generate random decimal numbers between 0 and 99, now do as below:

1. Select a blank cell and type this formula =RAND()*99, and drag the fill handle to your needed range. See screenshot:
A screenshot showing the formula generating random decimal numbers between 0 and 99 in Excel

2. Then click Home tab, and go to click Increase Decimal button or Decrease Decimal button to specify the decimal numbers.

Generating random numbers between X and Y

If you want to insert random numbers between X and Y, you can use this formula, =RAND()*(Y-X)+X (X and Y indicate any number, and X<Y). For instance, I will insert random numbers between 33 and 88, now you can do as this:

1. Select a blank cell, and type this formula =RAND()*(88-33)+33, and drag the fill handle to the range you need. See screenshot:
A screenshot showing the formula generating random numbers between 33 and 88 in Excel

2. Then click Home tab, and go to click Increase Decimal button or Decrease Decimal button to specify the decimal numbers.


Generating random decimal or integer numbers with Insert Random Data utility

If you need to generate random data supposing random decimal, integer numbers usually, I introduce a handy tool – Kutools for Excel’s Insert Random Data to you, which can help you quickly and easily finish below operations without formulas:

Insert random integer numbers

Insert random decimal numbers

Insert random date or time

Insert random string or custom list

Kutools for Excel, equipped with AI 🤖, offers over 300 handy features to simplify your tasks.

After free installing Kutools for Excel, please do as below:

Applying the Insert Random Data utility by clicking Kutools > Insert > Insert Random Data.
A screenshot showing the Insert Random Data utility on the Kutools tab

Insert random integer numbers

1. Select a range of cells that you want to insert the random integer numbers, then click Kutools > Insert > Insert Random Data.

2. Under the Integer tab of the Insert Random Data dialog, enter the scope of integer numbers you want to insert randomly, if you want the random data inserted without duplicate, check Unique values checkbox.
A screenshot showing the Integer tab in the Insert Random Data dialog

3. Click Ok, then the selected cells have been inserted random integer numbers.
A screenshot showing randomly inserted integer numbers in Excel

Insert random decimal numbers

1. Select a range of cells that you want to insert the random decimal numbers, then click Kutools > Insert > Insert Random Data.

2. Under the Decimal tab of the Insert Random Data dialog, enter the scope of decimal numbers you want to insert randomly, and specify the decimal place, if you want the random data inserted without duplicate, check Unique values checkbox.
A screenshot showing the Decimal tab in the Insert Random Data dialo

3. Click Ok, then the selected cells have been inserted random integer numbers.
A screenshot showing randomly inserted decimal numbers in Excel

Insert random date or time
A screenshot showing the option to insert random dates
A screenshot showing the option to insert random times

Insert random string or custom list
A screenshot showing the option to insert random strings

Demo: Insert Random Numbers, Dates And Passwords In Excel

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Quickly Sort or select cells/Rows/Columns randomly from a selection in Excel

Kutools for Excel's Sort Range Randomly can quickly sort or select data randomly by cells or columns or rows. Click for full-featured 30 days free trial!
doc sort randomly
doc select randomly
 
 Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!