[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

RANDBETWEEN

Syntax:

RANDBETWEEN ( lower-bound , upper-bound )

Description: Computes a random integer number in the range lower-boundupper-bound. A new random integer number is returned every time the cell's value is calculated.

Arguments:

Name

Type

Description

lower-bound

number

The smallest integer that will be returned.

upper-bound

number

The largest integer that will be returned.

 

Return Type and Value: number – A random integer number in the range specified.

However, if lower-bound is greater than upper-bound, #NUM! is returned.

[Example:

RANDBETWEEN(1,6) results in an integer between 1 and 6, inclusive
RANDBETWEEN(-10,10) results in an integer between -10 and 10, inclusive

end example]