You are on the Home/Excel/Excel Tips/Random password page
Google
Web This Site

Generate a random alphanumeric password

How does one generate a password containing lowercase letters, uppercase letters, and numbers?  To generate a 13 character password, such as one needed for use with a wireless network router's 128 bit encryption wired equivalent protocol (WEP), do the following:

In A1:A13 enter the formula =INT(RAND()*62).  This generates random values from a selection of 62 numbers between 0 and 61 (10 digits + 2*26 letters since we are differentiating between lowercase and uppercase characters).

In B1 enter the formula =IF(A1<10,A1,IF(A1<36,CHAR(A1-10+65),CHAR(A1-36+97))).  Copy B1 to B2:B13.  Column B gives you a list of 13 random letters or numbers.

To get only uppercase letters or digits, use =INT(RAND()*36) and =IF(A16<10,A16,CHAR(A16-10+65))

To get only lowercase letters of digits, use =INT(RAND()*36) and =IF(A22<10,A22,CHAR(A22-10+97))