Use sampling to draw a random selection of rows from an open Add-In for Excel table and output it to a new Add-In for Excel table for further investigation. Individual rows are drawn only once and do not repeat.
Sampling is useful for producing an estimate concerning a particularly large data set that would be difficult to investigate in its entirety.
When you draw a sample, a number called a random seed is required as a starting point for the random number generation that underlies sampling. Add-In for Excel can generate the random seed automatically, or you can choose to specify the random seed yourself. The seed value you specify can be any number.
Note
Add-In for Excel uses the Microsoft .NET System.Random class as its random number generator. For more information, search the class name on the Microsoft Developer Network.
Specifying a random seed allows you to enter the same seed value later to produce an identical random sample from the unchanged data set. Reproducing a random sample could be a required part of repeating and verifying the investigation.
The sample size and the seed value are recorded in the history of the output Add-In for Excel table. If required, you can retrieve an automatically generated seed value from the table history and enter it manually as part of reproducing a random sample.
The number of samples cannot exceed the number of rows in the table.
Tip
If the data set and the number of samples are unchanged, entering the same seed value later produces an identical random sample.
Result the random sample of rows appears in a new Add-In for Excel table.