Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old October 29th 04, 10:35 PM
 
Posts: n/a
Default random alphanumeric string

Doe anyone know of a way to generate an alphanumeric string?

  #2   Report Post  
Old October 29th 04, 10:57 PM
Harald Staff
 
Posts: n/a
Default

For a start
=CHAR(INT(RAND()*26+65))&CHAR(INT(RAND()*26+65))&C HAR(INT(RAND()*26+65))

this is easier and better done with macro code (VBA), but this is the
worksheet function group.

HTH. Best wishes Harald

"
skrev i melding
...
Doe anyone know of a way to generate an alphanumeric string?



  #3   Report Post  
Old October 29th 04, 11:04 PM
Dave R.
 
Posts: n/a
Default

One way is to use RANDBETWEEN and CHAR(),

numbers are 47-59 and letters (cap) from 65-90.

So you might want to use a formula like this:

=CHAR(CHOOSE(RANDBETWEEN(1,2),RANDBETWEEN(48,57),R ANDBETWEEN(65,90)))

which will randomly give you a number or capital letter.. copy it to as many
columns as you like, then create some formula like

=A1&B1&C1&D1&E1

to join them together (in that case a 5 character random alphanumeric
string).



"
wrote in message
...
Doe anyone know of a way to generate an alphanumeric string?



  #4   Report Post  
Old October 29th 04, 11:09 PM
Dave R.
 
Posts: n/a
Default

Typo....numbers are 48-57, as in the formula.



"Dave R." wrote in message
...
One way is to use RANDBETWEEN and CHAR(),

numbers are 47-59 and letters (cap) from 65-90.

So you might want to use a formula like this:

=CHAR(CHOOSE(RANDBETWEEN(1,2),RANDBETWEEN(48,57),R ANDBETWEEN(65,90)))

which will randomly give you a number or capital letter.. copy it to as

many
columns as you like, then create some formula like

=A1&B1&C1&D1&E1

to join them together (in that case a 5 character random alphanumeric
string).



"
wrote in message
...
Doe anyone know of a way to generate an alphanumeric string?







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
How can I get Positive values only from the random number generat. Markw3700 Excel Discussion (Misc queries) 1 January 21st 05 12:37 AM
Extract hyperlink string from excel cell Ryan Sapien Links and Linking in Excel 1 January 20th 05 12:24 AM
Generating Correlated Random Values in Excel Randy Excel Discussion (Misc queries) 2 January 16th 05 09:50 PM
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 2 December 6th 04 05:01 PM
Add a string to a cell ramsdesk Excel Worksheet Functions 2 October 28th 04 07:20 AM


All times are GMT +1. The time now is 02:56 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017