Documentation/Calc Functions/RAND.NV

Function name:
RAND.NV

Category:
Mathematical

Summary:
Generates a uniformly distributed random number in the range 0 (inclusive) to 1 (exclusive). In contrast to RAND, RAND.NV is a non-volatile function that is not recalculated at every input event.

Syntax:
RAND.NV

Returns:
Returns a real number in the range [0, 1).

Arguments:
None.

Additional details:

 * RAND.NV is a non-volatile function. Such functions are not recalculated at new input events and do not recalculate when selecting or pressing F9, except when the cell containing the function is selected. Non-volatile functions are recalculated when opening the file.


 * Use the RAND function for a volatile equivalent that satisfies ODF 1.2 and is compatible with Microsoft Excel.


 * To generate random numbers that never recalculate, either:
 * Copy cells containing, and use  (with All and Formulas deselected and Numbers selected).
 * Use to fill a selected cell range with random numbers, generated in accordance with the flexible settings available through the Random Number Generator dialog.


 * To generate numbers in a range other than [0, 1), either:
 * Scale the value returned by RAND.NV to a new range using a formula of the form  to generate a number in the range [a, b]. For example, the formula   would generate random numbers in the range [-10, 10).
 * Use the RANDBETWEEN function or its non-volatile equivalent RANDBETWEEN.NV.

Related LibreOffice functions:
RAND

RANDBETWEEN

RANDBETWEEN.NV

ODF standard:
None.

Equivalent Excel functions:
None.