Documentation/How Tos/Calc: RAND function

From Apache OpenOffice Wiki
< Documentation‎ | How Tos
Revision as of 07:09, 25 December 2007 by Drking (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


RAND

Returns a random number between 0 and 1.


Syntax:

RAND()

This function produces a new random number each time Calc recalculates.
To force Calc to recalculate manually press Shift+Ctrl+F9.
To generate a random number which never recalculates, copy a cell containing =RAND(), and use Edit - Paste Special... (with Paste All and Formulas not selected and Numbers selected).


Example:

RAND()

returns a random number between 0 and 1.

RAND()*(b-a) + a

returns a random real number between a and b.


See also:

RANDBETWEEN

Mathematical functions

Personal tools