Strong passwords are needed to protect your electronic accounts from brute force attacks and other cyberattacks attempted by hackers. In this article, I am going to show you how you can generate a random strong password in Microsoft Excel.
Excel comes with several inbuilt formulas to calculate cell values. It also provides you a Random Number Generator formula to quickly generate a random number from a range. But, how you can use this formula to generate a strong password? Let us find out in this tutorial.
Generate Random Strong Password using Excel
You can create a random strong password in Excel by following these two main steps:
- Create a Sheet Structure for Random Password Generator
- Add Formulas to Generate a Random Strong Password
Let’s elaborate on these steps now!
Create a Sheet Structure for Random Password Generator
At first, you need to create a basic structure of your sheet to generate a random strong password. This includes declaring password length, uppercases, lowercases, numbers, and the special characters you want in the output password.
Start with defining the basic fields’ names from the A3 cell that include Password Length, Uppercasess, Lowercases, Digits, Special Characters. Leave the A8 cell empty and then enter fields including Press Shift+F9 to Regenerate and Password.
Shift+F9 hotkey is used to refresh a cell value in Microsoft Excel. Hence, to regenerate a random password, you can press this hotkey and see the changed random password.
Coming to declaring values for the above-mentioned fields, start from the C3 cell. Enter the password length first, then ‘Yes‘ for all other fields including uppercase, lowercase, digits, and special characters. As we want to generate a strong password, we must include a combination of all these values. Hence, we have entered a Yes to these fields.
Next, in the D column, specify all values of uppercases, lowercases, digits, and special characters to respective rows. You can add custom special characters that you want in the random output password.
For example, in the Uppercase field, type all letters in capitals like ABCDEFGHIJKLMNOPQRSTUVWXYZ.
Similarly, for digits, enter 9876543210. All the specified values will be used to generate a random strong password.
TIP: Create stronger passwords and passphrases using ASCII characters.
Add Formulas to Generate a Random Strong Password
After creating the basic structure of the sheet for random password generator, comes the main task. You have to use formulas in order to generate a random strong password.
Firstly, generate a string using all values of uppercase, lowercase, digits, and special characters using the following formula in the D8 cell:
=IF(C4="Yes",D4,"") &IF(C5="Yes",D5,"") &IF(C6="Yes",D6,"") &IF(C7="Yes",D7,"")
The above formula will create a string of all characters from all defined fields, as shown in the below screenshot.
Now, to generate a random value from all characters, enter the below formula in the C10 cell:
This formula will only generate a single value as shown in the below screenshot.
Next, to generate a long string of a strong password, you will have to repeat the above formula string multiple times with “&” in a go. For example, if you want to generate a random value with 3 characters, you will have to use it three times repeatedly with “&” between each formula. Your formula will look something like the below one:
So, just copy the random number generator formula, add a “&” after the first string, and then paste it multiple times in the Function bar. Do remember that the equal (=) sign will come only at the start of the formula.
Finally, press the Enter button and it will generate a random strong password in the C10 cell.
You can now select C10 (password) cell and press the Shift+F9 shortcut key to regenerate a new random strong password again. And, do it as many times as you want.
In this tutorial, I have shared steps to generate a random strong password in Excel using its inbuilt formula library. You can follow these steps and generate as many strong passwords as you want in Excel, without needing an external add-on service.
Now read: How to use Automatic Data Type feature in Microsoft Excel.