Thanks to all for the great and timely help. In fact while I was in
attempting to implement some of the suggestions, a programmer friend
responded to his voice mail and knocked out a couple of C programs for
me that did the trick.
I understand that there is no true randomization via computer, only a
reasonable approximation thereof. For my clients purposes that's good
enough. My client specifically asked to exclude all vowels and the
letter Z but did not mention upper/lower. I also agree that the
exclusions mentioned by Richard are a good suggestion for the future.
Happy New Year to all.
Andy
On Dec 29, 2007, at 7:31 PM, Steve Cassidy wrote:
On 29/12/07 15:38, "Andrew Kappy" <[EMAIL PROTECTED]> 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.
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.
Any suggestions will be greatly appreciated.
Andy
I think you've had plenty of suggestions as to how this might be
achieved.
However, I just wanted to draw attention to one issue -- probably an
insignificant one.
You suggest that you want a set of random numbers without
duplicates. If you
REALLY want random numbers, then you cannot apply such conditions. A
set of
random numbers may include duplicates; you cannot specify that there
are
"too many" duplicates in a particular set of random numbers.
Now, for your purposes, you are quite likely happy with a looser
meaning of
the word random; that's fine. I just wanted to point out that you
are not
going to end up with a true set of random numbers -- the
distribution will
have a very, very slight bias. On the other hand, I believe it's
also true
to say that you won't end up with true random numbers if you use the
RANDOM
function. I'd suppose the only way to be sure of a really random
number is
to base it on something like radioactive decay.
Steve