Spread 8.0 Documentation
RAND
Support Options
Formula Reference > Built-In Functions > RAND

Glossary Item Box

RAND


Name

Random number

Description

Returns an evenly distributed random number greater than or equal to 0 and less than 1. The RAND function returns a new random number every time the sheet is calculated.

Syntax

RAND( )

Remarks

This function does not accept arguments.

To generate a random real number between x and y, with y greater than x, use the following expression:

RAND()*(y-x)+x

To generate a random integer between x and y, with y greater than x, use the following expression:

int((y-x+1)*RAND()+x)

Data Type

Does not accept data. Returns numeric data. For more information, see Data Type for Each Cell Type.

Example

RAND()
RAND()*100
int(RAND()*100)

Copyright © GrapeCity, inc. All rights reserved.