Returns a random number.
The
RND function returns a random value between zero and the specified
number, inclusive of zero but exclusive of
number. Thus the available range of returned numbers is 0 through
number-1.
If
number is a fractional number it is truncated to its integer portion. If
number is a negative number, a negative number is returned.
A
number string value is parsed as a number until a non-numeric character is encountered. Thus “7dwarves” is parsed as 7. If
number resolves to 1, 0, or -1,
RND always returns 0. If
number is a non-numeric string or the empty string (""), it is parsed as 0, and thus
RND always returns 0.