Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Randomize Decimal Number

Tags:

random

excel

I found a very nice function in MS Excel 2007 which is RANDBETWEEN(bottom, top). The problem with this is that it randomize whole number only. Using this formula:

=RANDBETWEEN(7.0, 9.9)

yields

8.0
9.0
7.0
7.0
etc...

How can I modify it so that it will also produce decimal numbers like below

7.5
7.2
9.4
9.5
7.1
8.5
etc...
like image 928
John Woo Avatar asked May 28 '12 13:05

John Woo


People also ask

Can you do Randbetween with decimals?

In this example, the RANDBETWEEN function generates random numbers between 2 and 4 with a decimal. Since it actually can't generate numbers with decimals the function generates values between 20 to 40.

What is a random decimal number?

Integer Decimal. Precision: digits. A random number is a number chosen from a pool of limited or unlimited numbers that has no discernible pattern for prediction. The pool of numbers is almost always independent from each other. However, the pool of numbers may follow a specific distribution.

How do I generate a random 4 digit number in Excel?

Select a blank cell and type this formula =TEXT(ROW(A1)-1,"0000") into it, and press Enter key, then drag the autofill handle down until all the 4 digits combinations are listing.

Does the Randbetween function generate decimal or integer values?

Like RAND, Excel's RANDBETWEEN is a volatile function and it returns a new random integer every time your spreadsheet recalculates.


2 Answers

Use randbetween(70,99) and divide the result by 10.

like image 144
Vicky Avatar answered Oct 04 '22 00:10

Vicky


Refer this http://ms-office.wonderhowto.com/how-to/generate-random-numbers-with-decimals-excel-338595/

Random decimal number between 30-40

=rand()*10+30

Random decimal number between 0-100

=rand()*100+0
like image 23
Deepesh Avatar answered Oct 04 '22 02:10

Deepesh