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
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hello, NeoMoses,

it's fine you want to share your thoughts!
but it's a bit confusing since you didn't follow the recomandations to post your sheet: that's why you get &nbsp and also &amp
EDIT your post : erase htmlcode
run again the procedure
choose the "view code" button
select all
copy and paste here

On the "Excel Questions" main page there is a link to HTML Maker FAQ. You'll find out how to post correctly.

kind regards,
Erik
 
Upvote 0
Ok, it should be displaying properly now.

Basically, there's 2 things going on. First, generate a table of random characters that you can use to choose from using =CHAR(RANDBETWEEN())

I chose 4 columns, UpperCase, LowerCase, Numbers, and Special Characters. I arbitrarily chose 30 rows long.

Once you've generated your table of random characters that fit your password rules, randomly select characters from this table using:
=INDEX(G3:J33,RANDBETWEEN(1,30),2)

Now, all you have to do to make an N-character random password is string together N of the above lines with the ampersand (&) like so:

=INDEX(G3:J33,RANDBETWEEN(1,30),2)&INDEX(G3:J33,RANDBETWEEN(1,30),2)...

As you may be able to tell, I've set this sheet up to have 4 different types of passwords: lowercase only, lower+upper, lower+upper+numbers, and finally all characters. This way, if a certain site does not allow special characters, you can still quickly and easily choose a password.

I put the NOW() function in there for screencaps. It may be useful in the future for remembering passwords.
 
Upvote 0
which version?

Does the above formula need an addin or a specific version of excel ?
Does not seem to work in Office XP.

:eek:


erik.van.geit said:
thank you !

kind regards,
Erik
 
Upvote 0
Hi, Santeria,

I'm glad you came back to the board !
We didn't see you for a long time ?

yes, it needs some more: you need analysis toolpak
but you can easily use rand() instead
randbetween(1,30)
INT(RAND()*30+1)

general formula see helpfiles
Int((max - min + 1) * Rnd + min)

(y)
Erik
 
Upvote 0
mMMM.
I am trying to get it for people who don't/can't have the analysis toolpak.
Can RAND be construed so as to have a 6 or 7 character password ?
Not real clear if this is doable.

Yup, finally back to doing some more excel. Mostly tech support right now, but its phone based ( no fun), hopefully I can get to the university and do support there.

:biggrin:


erik.van.geit said:
Hi, Santeria,

I'm glad you came back to the board !
We didn't see you for a long time ?

yes, it needs some more: you need analysis toolpak
but you can easily use rand() instead
randbetween(1,30)
INT(RAND()*30+1)

general formula see helpfiles
Int((max - min + 1) * Rnd + min)

(y)
Erik
 
Upvote 0
Santeria,

here you get my inspiration of the last hour :biggrin:
I think this is wonderful :cool:
Code:
B2: =CHAR(INT(RAND()*(57-48+1)+48))
B3: =CHAR(INT(RAND()*(90-65+1)+65))
B4: =CHAR(INT(RAND()*(122-97+1)+97))
B6: =INT(RAND()*2)*32
B7: =CHAR(INT(RAND()*(90-65+1)+65)+INT(RAND()*2)*32)
B9: =IF(RAND()>26/36,CHAR(INT(RAND()*(57-48+1)+48)),CHAR(INT(RAND()*(90-65+1)+65)))
B10:=IF(RAND()>52/62,CHAR(INT(RAND()*(57-48+1)+48)),CHAR(INT(RAND()*(90-65+1)+65)+INT(RAND()*2)*32))
column C has same formulas with & in between
= formula & formula & formula
for instance
C2: =CHAR(INT(RAND()*(57-48+1)+48))&CHAR(INT(RAND()*(57-48+1)+48))&CHAR(INT(RAND()*(57-48+1)+48))
randomcode.xls
ABCDE
1what1 sign3 signscodecomment
2number054148 to 57
3uppercasecodeAGSR65 to 90
4lowercasecoderzek97 to 122
5
60 or 32032 = 97 - 65
7ucase & lcaseTaxX
8
9ucase & numberZST936 = 26 + 10
10uc & lc & numberlvE662 = 26x2 + 10
Blad3


kind regards,
Erik
 
Upvote 0
sorry, I completely forgot to substitue the 122 - 97 + 1 ... by the result
here are the formulas without those "calculations

Code:
=CHAR(INT(RAND()*10+48))
=CHAR(INT(RAND()*26+65))
=CHAR(INT(RAND()*26+97))

=INT(RAND()*2)*32
=CHAR(INT(RAND()*26+65)+INT(RAND()*2)*32)

=IF(RAND()>26/36,CHAR(INT(RAND()*10+48)),CHAR(INT(RAND()*26+65)))
=IF(RAND()>52/62,CHAR(INT(RAND()*10+48)),CHAR(INT(RAND()*26+65)+INT(RAND()*2)*32))

(y)
Erik
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,820
Members
449,469
Latest member
Kingwi11y

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