Home : Products : Hach WIMS : Hach WIMS Client : Documentation : Function Reference : Spread Functions : Primitive Functions : RAND
Q11580 - INFO: RAND

RAND (Primitive Spread Function) 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) 

EXAMPLES:

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

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 8/27/2008 4:15 PM.
Last Modified on 8/27/2008 4:15 PM.
Last Modified by No Author Name Available!.
Article has been viewed 2280 times.
Rated 7 out of 10 based on 2 votes.
Print Article
Email Article