View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Generating a random 17-character alphanumeric string

Two hundred thousand unique rands will most likely sap Excel's performance
considerably. I have some code that will generate any number of unique
random longs. See http://www.cpearson.com/excel/randomNumbers.aspx, in the
Unique Random Longs section, but I make no promises about calculation times.
You can either modify that code to return alpha-numeric strings or you can
use it as is to generate the longs and then use some formula to create a VIN
out of the long.

Just out of curiosity, are you sure that your VINs can be simply unique
strings? I used to do plant automation programming for General Motors and
for Caterpillar, and I wrote a program to generate VINs. Those VINs had to
be formatted according to, I think, Dept Of Transportation formats.

--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

"Dan" wrote in message
...
EXCEL 2007
I would like to generate a column of random 17-character alphanumeric
strings into cells A1:A100000. I'd also like to continue into column B:
eg;
B1:B100000 so that I have 200000 random VINs.
Can anyone help? I can think of some brute-force methods but I'm looking
for
an elegant solution. I think it can be done in one column with EXCEL 2007.
Thanks for any help.
Dan