Random Function (RAND) and Random Between (RANDBETWEEN) in excel



A. RANDOM FUNCTION (RAND)


Random function is one of mathematical function in excel that will returns an evenly distributed random real number greater than or equal to 0 and less than 1. A new random real number is returned every time the worksheet is calculated.

Syntax for Random function
RAND( )

Notes :
To generate a random real number between a and b, can use:
RAND()*(b-a)+a

If you want to use RAND to generate a random number but don't want the numbers to change every time the cell is calculated, you can enter =RAND() in the formula bar, and then press F9 to change the formula to a random number., or you can copy paste cell or range that contain random  value to other cless /ranges , then on paste dialog select "Paste Special - Values"

B. RANDOM BETWEEN TWO NUMBER FUNCTION (RANDBETWEEN)

RandBetween will returns a random integer number between the numbers you specify. A new random integer number is returned every time the worksheet is calculated.

Syntax for Random Between
RANDBETWEEN(bottom,top)

Bottom is the smallest integer RANDBETWEEN will return.
Top is the largest integer RANDBETWEEN will return.

This posting contain tutorial how to use rand and randbetween in excel

1. Create formula below
a. In cells A4 type formula :
=RAND()
b. In cell B4 type formula:
=RAND()*100
c. In cell C4 type formula
=RAND()*(100-0)+0
d.In cel D4 type formula:
=RANDBETWEEN(1,100)

Then result will show like images below

random function

You can download excel files in xls format on attachment files.


Ĉ
papao nn,
Oct 6, 2011, 12:18 AM
Comments