Mac OS X,  Windows XP

Produce Random Complex Passwords in Excel

Recently, I’ve been spending a lot of time normalizing data in Excel. And when I needed to generate a bunch of passwords for a project, I almost switched to another tool to do so. But I decided that I was already in Excel so I might as well do it there. Excel has a couple of random (pseudorandom) number and character functions in RAND() and RANDBETWEEN(). In its simplest, let’s just pick a number between one and ten:

=RANDBETWEEN(1,10)

Now let’s pick a number that’s 9 characters after a decimal:

=RAND()

Or make it a regular nine character number:

=RAND()*1000000000

Regrettably numbers are OK for passwords. So let’s bump up our game a little and produce a random letter that can be used in a password (64+26=90):

=CHAR(RANDBETWEEN(65,90))

Or for more complex characters (thus allowing for more modern passwords):

=CHAR(TRUNC(RAND()*90+33))

You can then add an ampersand after and throw it in again, like so (minus the = to kick off the formula) for a two character password:

=CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))

This allows you to create about as many characters worth of passwords as you’d like. You can use simpler characters by reducing the numbers in the formula.