Difference between revisions of "Documentation/How Tos/Calc: RANDBETWEEN function"
From Apache OpenOffice Wiki
< Documentation | How Tos
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
m |
||
Line 28: | Line 28: | ||
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
− | [[Category: Documentation/Reference/Calc]] | + | [[Category: Documentation/Reference/Calc/Mathematical functions]] |
Revision as of 08:09, 3 May 2010
RANDBETWEEN
Returns an integer random number in a specified range.
This function is only available if the Analysis AddIn is installed.
Syntax:
RANDBETWEEN(bottom; top)
- Returns an integer random number between integers bottom and top (both inclusive).
- 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 this function, and use Edit - Paste Special... (with Paste All and Formulas not selected and Numbers selected).
- An alternative to this function not requiring the Analysis AddIn would be:
- INT(RAND()*(top-bottom+1))+bottom.
Example:
RANDBETWEEN(20; 30)
- returns an integer between 20 and 30 (inclusive).