In other words, when using the random number generator in Excel, you cannot get a repeatable sequence with the RAND or RANDBETWEEN function, nor with VBA, nor by any other means. And every time an Excel random function is called, a new seed is used that returns a unique random sequence. Technically, a seed is the starting point for generating a sequence of random numbers. There is no way to seed either Excel RAND or RANDBETWEEN function, which are rumored to be initialized from the computer's system time.For a more scientific explanation, please check out. The outcome of the toss is six possible values (1, 2, 3, 4, 5, 6) and each of these values is equally likely to occur. A good example of the uniform distribution is tossing a single die. The Excel RAND and RANDBETWEEN functions generate pseudo-random numbers from the Uniform distribution, aka rectangular distribution, where there is equal probability for all values that a random variable can take on.Well, what do we know about the random number generator in Excel? This is the reason why it has never been documented and will hardly ever be.
What it means for you is that, in theory, random numbers generated by Excel are predictable, provided that someone knows all the details of the generator's algorithm. Like most computer programs, Excel random number generator produces pseudo-random numbers by using some mathematical formulas. Let's take a closer look at the Excel random generator algorithm so that you know what you can expect from it, and what you cannot. But don't write it off immediately :) Pseudo-random numbers produced by the Excel random functions are fine for many purposes.
In plain English, random data is a series of numbers, letters or other symbols that lacks any pattern.
The tutorial explains the specificities of the Excel random number generator algorithm and demonstrates how to use RAND and RANDBETWEEN functions to generate random numbers, dates, passwords and other text strings in Excel.īefore we delve into different techniques of generating random numbers in Excel, let's define what they actually are.