How To Generate A Password With Random Letters And Numbers In Excel

Password Generator Video using MS Excel

The video is showing how to generate a password with random letters and numbers in excel information but also try to cover the following subject:

-generate random password in excel

-excel vba random password generator

-excel vba password generator free download

So you want to find out more about how to generate a password with random letters and numbers in excel, i did too and here’s the result.

How to generate a password with random letters and numbers in excel interested me so i did some research and published this to YouTube .

Code could be found here: https://docs.google.com/spreadsheets/d/1A-51tP76i5dz2jzyNKkdPaEb803es_9r/edit?usp=sharing&ouid=112789133191213312498&rtpof=true&sd=true

Be sure to click Enable Editing when opening in Microsoft Excel.

Be sure to click Enable Content when opening in Microsoft Excel.

Sub rand()

Dim length As Integer
Dim char As Variant
Dim x As Long
Dim str As String

‘length = 10
length = Sheet1.Range(“C3”).Value

‘check if length is greater than 0

If length < 1 Then
MsgBox “Length must be greater than 0”
Exit Sub
End If

‘Bank of Characters

char = Array(“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”, _
“k”, “l”, “m”, “n”, “o”, “p”, “q”, “r”, “s”, “t”, “u”, “v”, “w”, “x”, _
“y”, “z”, “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “!”, “@”, _
“#”, “$”, “%”, “^”, “&”, “*”, “A”, “B”, “C”, “D”, “E”, “F”, “G”, “H”, _
“I”, “J”, “K”, “L”, “M”, “N”, “O”, “P”, “Q”, “R”, “S”, “T”, “U”, “V”, _
“W”, “X”, “Y”, “Z”)

‘Select random characters from the bank.

For x = 1 To length
Randomize
str = str & char(Int((UBound(char) – LBound(char) + 1) * Rnd + LBound(char)))

Next x

Sheet1.Range(“C4”).Value = str

With New MSForms.DataObject
.SetText Sheet1.Range(“C4”).Value
.PutInClipboard
End With

End Sub