Hey,
Open your file and click Alt+F11. VBA editor opens.
Goto Insert/Module and a new Module1 will open. Copy Paste the code below.
Sub generate_password()
Dim lst As String, pass As String
Dim pass_len As Integer
lst = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"
pass_len = 8
For Each cll In Application.Selection
pass = ""
For i = 1 To pass_len
pass = pass & Mid(lst, Int(Rnd() * Len(lst)), 1)
Next
cll.Value = pass
Next
End Sub
Add a button on the sheet (or a textbox). right click on it and select 'Assign Macro'. select the macro we added and hit OK.
so you can either just select a single cell or a bunch of cells and hit the button to generate random passwords.
to change the length of your password modify the line 'pass_len = 8'.
hope this is what you were looking for.
Cheers
Bookmarks