At 10:38 AM -0500 12/29/07, Andrew Kappy wrote: >I'm looking for help with two random number problems. > >1. I need to generate 750,000 alpha-numerics, 6 characters long, >excluding certain letters. I have no problem generating as many random >numbers as I want, using the RANDOM function, but getting down to 6 >alpha-numerics without duplicates is the problem. I've generated 1.5 >million random numbers and translated them to integers. I've also >built a numbered table of included alpha characters. I've tried >various calculations to grab 4 numbers from the larger random number >and combine them with two of the letters via calculations. The result >is way too many duplicates.
Just to warn you, I am not a statistician. ;-) If what you want is a random ordered list of 6-character codes first generate 750,000 of your 6 character codes in a unique, non-random order, then assign a large random number to each character. Then sort by the number field. You will have a list with the codes in a random order. If you want the scope of the codes to cover all possible combinations, just generate all 2,176,782,336 (maximum) combinations first, apply the random numbers, and sort. Take the first 750,000 for your list. Shouldn't take too many days of processing. ;-) >2. I need to generate over 10,000 records of 24 fields, with the >numbers 1-24 (or letters A-X) randomly distributed through each >record, with no repeats within a record and no distribution repeated >within the 10,000 records. A variant of the above technique may also work for this problem. Dave Vaklyes
