I am a supporter of
St. Joseph's hospice.
 If you find this site useful or if it helped you, consider a small donation to
St. Joseph's, please.

Information on
St. Joseph's

JustGiving - Sponsor me now!


Random Numbers

"Probable impossibilities are to be preferred to improbable possibilities." [Aristotle]

Here I present some functions for random number generation.

I assume that Excel's © internal rand() function generates random numbers of sufficient quality (that is: randomness). You may want to substitute it. In this case search the web for alternatives.

Random functions:

Examples of simple distribution functions are presented here.

Cholesky - Generate correlated random numbers with a Cholesky decomposition.

Iman Conover - Generate correlated random numbers with worksheet functions or with VBA.

sbGrowthSeries - Generate a random data series with a given compoundgrowth rate and a given maximum relative change rate per step

PF_Allocate - Generate portfolio assets with a given sum and lower boundaries and upper boundaries

Random_Pick - Pick n random cells from selection

RndDecPlace - Create a random number between two borders with a given number of decimal places.

sbExactRandHistogram - Create a random distribution with exactly the requested frequency for given numbers (Largest Remainder method will be applied if that is not exactly possible to minimize the absolute error)

sbRandInt - Generate n non-repeating (or repeating up to r times) random integers between two given borders

sbRandIntFixSum creates random integers which add up to a defined sum

sbRandSum1 - Generate n random numbers which sum up to 1

UniqRandInt - Generate n unique random integer numbers in a given range 1..m (m >= n) [provided just for historical purposes - I suggest to use sbRandInt now]

Sulprobil   Get it done   Contact   Disclaimer   Impressum   Download