RAND
Spread WinRT Documentation > Formula Reference > Formula Functions > RAND

Summary

This function returns an evenly distributed random number between 0 and 1.

Syntax

RAND()

Arguments

This function does not accept arguments.

Remarks

This function returns a new random number.

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)

For more information, refer to Volatile Functions.

Data Types

Does not accept data. Returns numeric data.

Examples

RAND()

RAND()*100

INT(RAND()*100)

See Also