random alphanumeric string

H

Harald Staff

For a start
=CHAR(INT(RAND()*26+65))&CHAR(INT(RAND()*26+65))&CHAR(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

"(e-mail address removed)"
 
D

Dave R.

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),RANDBETWEEN(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).



"(e-mail address removed)"
 
D

Dave R.

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



Dave R. said:
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),RANDBETWEEN(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).



"(e-mail address removed)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top