Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to generate random decimal/integer numbers in Excel?

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

Generating random integer numbersgood idea3


Insert Random Data (insert random integer, date, time, string or custom list in a range.)

excel addin tool for generate random integers dates times strings custom lits

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately. 60-day Unlimited Free Trial


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.
doc-randomize-decimal-integer-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.

doc-randomize-decimal-integer-2

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:
doc-randomize-decimal-integer-3

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:
doc-randomize-decimal-integer-4

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


Generating random integer numbers

To generate random integer number in Excel, I will introduce two methods for you.

Method 1 Formula

If you want to randomize integer numbers between 0 and X, you can use this formula =INT(RAND()*X), for instance, I will insert random numbers between 0 and 50, I will type =INT(RAND()*50) into an empty cell, then drag the fill handle to the range you need.
doc-randomize-decimal-integer-5

If you want to randomize integer numbers between X and Y, you can use this formula =RANDBETWEEN(X,Y) (X and Y indicate any integer numbers, and X<Y), for instance, I will randomize integer numbers between 14 and 67, I will type =RANDBETWEEN(14,67) into a blank cell, and drag the fill handle to a range.
doc-randomize-decimal-integer-6

Method 2 Insert Random Data of Kutools for Excel

With Insert Random Data feature of Kutools for Excel, you can insert any random integer numbers as you need in a short time.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

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

1. Select a range you want to randomize the integer random numbers, and click Kutools > Insert Tools > Insert Random Data. See screenshot:
doc randomize decimal integer 10

2. In the Insert Random Data dialog, go to the Integer tab and type the random numbers’ range you need into From and To text boxes. See screenshot:
doc randomize decimal integer 11

Tip: If you want the inserting random numbers are unique, you can check Unique values in the dialog.

3. Click Ok to apply and exit dialog.
doc-randomize-decimal-integer-9

With Insert Random Data feature of Kutools for Excel, you can insert the random date, random string, and random custom list.


Select Range Randomly(Sort Range Randomly can quickly select or sort data randomly in a range/column/row.)

doc select randomly


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  • Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  • Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  • Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  • No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  • Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  • Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.