Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SRK SRK is offline
external usenet poster
 
Posts: 7
Default Random Code Generation

I need to create 2 million random, non-dublicating aphla-numeric codes each
month. Can a function in Excel provide me with this?
--
Thanks for your suggestions.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Random Code Generation

Select columns A thru AE and run this tiny macro:

Sub MakeRandum()
i = 1
v1 = 65
v2 = 90
For Each r In Selection
r.Value = i & Chr(Int(((v2 - v1 + 1) * Rnd) + v1))
i = i + 1
Next
End Sub
--
Gary''s Student - gsnu200812


"SRK" wrote:

I need to create 2 million random, non-dublicating aphla-numeric codes each
month. Can a function in Excel provide me with this?
--
Thanks for your suggestions.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Random Code Generation

For Non MACRO usage, I've tried a formula:

req:-

create a array of alphabets "A to Z" and 10 numerals in a 6 by 6 grid (i pu
the grid from cells f7 to k12.

then i put:


=INDIRECT(CHAR(MOD(LEFT(RAND()*10,1),6)+6+64)&(MOD (LEFT(RAND()*10,1),6)+7))

to generate a single alphanumeric character.

you can concatenate the complete formula to gerate more digits.

so for 3 digit no generation, it will be

=INDIRECT(CHAR(MOD(LEFT(RAND()*10,1),6)+6+64)&(MOD (LEFT(RAND()*10,1),6)+7))
&
INDIRECT(CHAR(MOD(LEFT(RAND()*10,1),6)+6+64)&(MOD( LEFT(RAND()*10,1),6)+7))
&
INDIRECT(CHAR(MOD(LEFT(RAND()*10,1),6)+6+64)&(MOD( LEFT(RAND()*10,1),6)+7))

spaces in between are only for clarity.

--
Kind Regards,
Satti Charvak
Only an Excel Enthusiast
Noida, India


"SRK" wrote:

I need to create 2 million random, non-dublicating aphla-numeric codes each
month. Can a function in Excel provide me with this?
--
Thanks for your suggestions.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random List Generation carl Excel Worksheet Functions 4 May 23rd 06 02:18 PM
random number generation scotjo Excel Worksheet Functions 4 January 9th 06 04:06 PM
Random Team Generation newbie Excel Discussion (Misc queries) 2 October 7th 05 05:14 PM
Random Name Generation pkbro Excel Worksheet Functions 1 June 21st 05 02:03 AM
I need help with random number generation David Stoddard Excel Worksheet Functions 10 March 28th 05 07:06 AM


All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"