RAND

RAND()

Returns the random number between zero and one (>=0 and <1).

REMARKS
* This function returns a number greater than or equal to zero and less than one.
* This is a Volatile function and will change everytime a cell on the worksheet is calculated.
* This function returns random values based on a uniform distribution.
* This function will update when the workbook is recalculated by pressing F9.
* This is one of the few functions that does not require any arguments.
* You must include the empty parentheses after the function name.
* The result from this function will change every time that the worksheet is calculated. If you have your calculation set to automatic then this will change every time you make an entry on the worksheet.
* To generate a random real number between a and b, use: RAND()*(b-a)+a
* If you want to generate a random number but don't want the number to change every time the cell is calculated, you can enter =RAND() in the formula bar, and press F9 to replace the formula with the value.
* You can use the INT function to return a number rounded down to the nearest integer.
* You can use the RANDBETWEEN function to return a random integer between two values (>=bottom and <=top).
* You can use the RANDARRAY function to return the array of random numbers between two values (>=min and <max).
* The equivalent VBA function is VBA.RND
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 A
1=RAND() = 0.444
2=RAND()*100 = 63.160
3=INT(RAND()*50)+1 = 38
4=RAND()*(20-10)+10 = 11

1 - Return a random number between 0 and 1.
2 - Return a random number between 0 and 100.
3 - Return an integere between 1 and 50.
4 - Returns a random number between 10 and 20.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top