Excel does not include a built-in method for generating sets of randomly sorted, uniformly distributed integers. This article describes how you can use the RAND function (which is integral to Excel) to create a set of this kind.
How to Generate Randomly Distributed Integers
Below is an example of a set of randomly sorted, uniformly distributed integers from 1 to 10:10 5 7 4 8 1 6 2 3 9
To generate such a set of randomly sorted, uniformly distributed integers, follow these steps:
- In a new worksheet, type the following:
A1: =RAND() B1: 1 A2: =RAND() B2: 2 A3: =RAND() B3: 3 A4: =RAND() B4: 4 A5: =RAND() B5: 5 A6: =RAND() B6: 6 A7: =RAND() B7: 7 A8: =RAND() B8: 8 A9: =RAND() B9: 9 A10: =RAND() B10: 10
- Select the range A1:B10.
- On the Data menu, click Sort.
- In the Sorted by list box, click Column A, and then click OK to sort the range.