Quantunet.com

My Account

Joins Us
Excel QuickSkills
The RAND() Function Knowledgebase  

The RAND() function returns an evenly distributed random number between 0 and 1.
  • The syntax for the function is RAND ().
The RAND function does not require an argument.

The function RAND gernerates a random nuymber between zero and one. For example: RAND() = 0.335489.
This result is a psudo-random number, meaning that a subtle patterns exists within the returned values.

Note: After a million or so calls to the RAND function certain values will disporotionately repeate themselves creating. However in Excel 2003 and 2007 the number generation alogorithm has significantly imporved providing more "reliable" random distribution when requiring a large number of random values. However there are still some problematic bug in the new system [RAND function bugs in excel 2003]

The random numbers in excel will naturally repeat after a significant number of calls to the RAND function but the numbers that repeat themselves are deemed random also creating an even distribution (under ideal conditions assuming no bugs). This makes the RAND function unsuitable for true lottery spreadsheet as lottery numbers cannot repeat themselves (because the chosen numbers are not replaced once they are removed form the set). However "radom" numbers suitable for lottery simulations can be generated in excel using a small amount of VBA macro code which can generate psudo-random non repeating numbers.

[The Random Number Mathematics Knowledgebase]



How to use the RAND() function:
  • Type " =RAND( "
  • Enter the coordinate of the first data cell "A2"
  • Type a colon.
  • Enter the coordinate of the last data cell "A7"
  • Type ")" then press the "Enter" key.

 
To generate numbers that are greater than 1 simply multiply the RAND() function or the result by the nessesary factor. e.g. For a number between 0 and 50: RAND()*50 = 45.6784611. The function will return numbers to 8 decimal places unless rounded to return less (when acted on by another function) or formatted to display less.


How to generate random numbers between 0 and 100:
  • Type " =RAND()*100 "
  • Type ")" then press the "Enter" key.

 

To return only integer random number between 0 and 100 use the INT() function e.g. INT(RAND()*100) = 68
How to generate integers between 0 and 100:
  • Type " =INT(RAND()*100) "
  • Type ")" then press the "Enter" key.

 
To generate a random number between two specific limits use the RANDBETWEEN() function. [The RANDBETWEEN() function knowledgebase].

Note: The RAND function recalcualtes each time the worksheet is refreshed. To force the worksheet to refresh press the "F9" key.


© 2007 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us