My Random Password Generator

NeoMoses

New Member
Joined
Jun 17, 2002
Messages
38
I've seen a few questions asking about random password generation, so I decided to try my hand at it. The entire sheet wouldn't fit, but I think this will get my point across. It uses no VBA, so a simple F9 will recalculate the sheet and give you all new passwords. Enjoy!
password generator.xls
BCDEFGHIJ
1only lower casepbqg4 DigitCharacter Table
2uatfu5 DigitUpperLowerNumberSpecial
3gfkqua6 DigitBs5*
4xsobifa7 DigitHq9*
5ddsqguis8 DigitQx2$
6rgpbquorq9 DigitBq0"
7pwqqwpoisi10 DigitSu1(
8Date5/6/2005 7:47Oq2#
9Lower + Upperoqik4 DigitBk3%
10bpTTQ5 DigitHq3&
11IBuHtD6 DigitIm8*
12AhsDIgS7 DigitTf4!
13BgfhJTQf8 DigitZf9!
14pBkHiBiEI9 DigitAi0"
15qZdpMbaxgE10 DigitPr9#
Password Generator 1.0
 
MTBer,

thank you for the link
just curious: why use 26 cells if it can be done with one formula ?
=IF(RAND()>52/62,CHAR(INT(RAND()*10+48)),CHAR(INT(RAND()*26+65)+INT(RAND()*2)*32))
this is the longest formula: generating numbers, or lcase or ucase letters: so 62 possible characters randomly choosen

(y)
Erik
EDIT: changed formula (57-48+1) ==> 10, etcetera (I pasted from the wrong post)
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Here's a single cell formula that generates a lower case letter 26/62 of the time.
an upper case letter 26/62 of the time,
and a number 10/62 of the time.

63 because 26 letters plus 26 letters + 10 numbers = 62. You could adjust the probability of each to suit your needs.

Concatenate for as many characters as desired.

Note: Analysis tool pack is not required.

Code:
=CHOOSE(MATCH(RAND(),{0,0.16,0.58}),
CHAR(INT((57+1-48)*RAND()+48-1)+1),
CHAR(INT((90+1-65)*RAND()+65-1)+1),
CHAR(INT((122+1-97)*RAND()+97-1)+1))

[Edit] Just for fun I pasted the function down 10,000 rows
and calculated the percentage of the time each character came up.

The average rate of occurence for the numbers was:
stdev of 0.001412012 average of 0.01596

Upper Case Letters
stdev of 0.001964344 average of 0.032323077

Lower Case Letters
stdev 0.001964344 average 0.032323077 (interesting exactly the same as for upper?)
 
Upvote 0
Hi, Teacher,

How do you count the lcase and ucase ?
A
a
a
A

=countif(range,"a") gives me 4
=countif(range,"A") gives me 4

kind regards,
Erik
 
Upvote 0
Good thinking Erik,
That's why I was getting exactly the same statistics. The count wasn't differenciating between the two. (the upper and lower case were produced correctly, but to differenciate when I counted upper and lower I should have used the Exact() function. Don't have time to play now. Keep up the good work!
 
Upvote 0
this is the formula to use
Code:
=SUMPRODUCT(--EXACT(A1:A5,B1))
perhaps easy for the experts, for me it was 15 minutes of research and experimenting :cool:

kind regards,
Erik
 
Upvote 0
Please have a look on the following created by Chinese Excel lover

1:
=CHAR(LARGE({0,33,65}+ROW(32:57),INT(RAND()*62)+1))

2:
{=CHAR(LARGE({0,33,65}+ROW(32:57),INT(RAND()*62)+1))}
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top