Random Passwords

R

RUSS

I am in Law Enf and our computer system is set up to require new, never
before used, passwords for every user every 90 days.

I have been attempting to generate random passwords in excel using this:
=CHAR(RANDBETWEEN(48,122))
It works fine except that it also creates passwords with characters other
than numbers and upper/lower case letters.

Can someone tell me how to generate random passwords resulting in only the
characters mentioned?

Thanks in advance... Russ
 
B

Biff

Hi!

One way:

List all the allowed chars in column A starting in A1. You could do this
using a formula if you want but it's not much faster than just manually
typing them in:

A1 = A
A2 = B
...
A26 = Z
A27 = 0
...
A36 = 9
A37 = a
...
A62 = z

In B1 enter this formula and copy down to B62:

=RAND()

Now, depending on how many chars you need for the pword, enter a formula
like this in, say, D1: (using a 5 char pword)

=A1&A2&A3&A4&A5

Now, select both columns A and B and do a sort on column B.

Biff
 
G

Guest

You could setup a table A1:B62. In column A, enter the numbers 1 through 62.
In column B enter your possible values 0 through 9, a through z, and A
through Z.

Then use VLOOKUP to get your password:

=VLOOKUP(RANDBETWEEN(1,62),$A$1:$B$62,2,FALSE)

HTH,
Elkar
 
H

Harlan Grove

Biff wrote...
One way:

List all the allowed chars in column A starting in A1. You could do this
using a formula if you want but it's not much faster than just manually
typing them in: ....
In B1 enter this formula and copy down to B62:

=RAND()

Now, depending on how many chars you need for the pword, enter a formula
like this in, say, D1: (using a 5 char pword)

=A1&A2&A3&A4&A5

Now, select both columns A and B and do a sort on column B.
....

This is a fine example of something that can be done easily using
scripting languages and not as easily using spreadsheets. But, WTH,
another alternative.

Define RPWC referring to

=MID("ABCDEFGHIJKLMNOPQRSTUVWXYZzbcdefghijklmnopqrstuvwxyz0123456789",
1+INT(62*RAND*()),1)

Then use formulas like

=RPWC&RPWC&RPWC&RPWC&RPWC
 
B

Biff

I like this, saves having to sort repeatedly.

To generate a new pword, just press F9.

A couple of minor typos:

No lowercase "A".

WXYZzbcde

1+INT(62*RAND*()),1)

Should be:

1+INT(62*RAND()),1)

Biff
 

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