Random Number Generator

I wanted to generate a set of random numbers without resorting to the rand() function in excel. I didn’t want results to change each time I opened the file but I wanted a way to seed different values when needed. I found this paper by Michael Lampton, Space Sciences Lab, UC Berkeley:

https://research.ssl.berkeley.edu/~mlampton/RandomSpreadsheet4.pdf

The paper has a formula for producing a set of random values using a modulus function on a large number while maintaining portability of such randomly generated numbers between different software and hardware platforms. Here’s my attempt at a summary of the formulas used within that paper:

random number generator spreadsheet

It’s a useful set of calculations for anyone looking for a way to generate random uniform [0,1] values from a seed value without resorting to the rand() command. I haven’t tested the portability aspect of it but the paper suggests that it is indeed portable with any spreadsheet capable of having 15 digit accuracy.


See also