需要强密码来保护您的电子帐户免受黑客企图的暴力攻击和其他网络攻击。在本文中,我将向您展示如何在Microsoft Excel中( Microsoft Excel)生成随机强密码(generate a random strong password )。
Excel带有几个内置公式来计算单元格值。它还为您提供了一个随机数生成器(Random Number Generator)公式,可以从一个范围内快速生成一个随机数。但是,如何使用此公式生成强密码(generate a strong password)?让我们在本教程中找出答案。
(Generate Random Strong Password)使用Excel生成随机强密码
您可以按照以下两个主要步骤在Excel中创建随机强密码:
- 为随机密码生成器(Random Password Generator)创建工作表结构(Sheet Structure)
- 添加公式(Add Formulas)以生成随机强密码(Random Strong Password)
现在让我们详细说明这些步骤!
为随机密码生成器(Random Password Generator)创建工作表结构(Sheet Structure)
首先,您需要创建工作表的基本结构以生成随机强密码。这包括在输出密码中声明密码长度、大写、小写、数字(password length, uppercases, lowercases, numbers,)和特殊字符(special characters)。
从定义A3(A3)单元格中的基本字段名称开始,包括密码长度、大写字母、小写字母、数字、特殊字符(Password Length, Uppercasess, Lowercases, Digits, Special Characters)。将A8单元格留空,然后输入字段,包括Press Shift+F9 to Regenerate和Password。
Shift+F9热键用于刷新Microsoft Excel中的单元格值。因此(Hence),要重新生成随机密码,您可以按此热键并查看更改后的随机密码。
要为上述字段声明值,请从C3单元格开始。首先输入(Enter)密码长度,然后为所有其他字段(包括大写、小写、数字(uppercase, lowercase, digits,)和特殊字符)输入“(special characters)是(Yes)” 。由于我们想要生成一个强密码,我们必须包含所有这些值的组合。因此(Hence),我们对这些字段输入了“是” 。(Yes)
接下来,在 D 列中,将大写、小写、数字和特殊字符的所有值指定到各行。您可以在随机输出密码中添加所需的自定义特殊字符。
例如,在大写(Uppercase)字段中,键入所有大写字母,如ABCDEFGHIJKLMNOPQRSTUVWXYZ。
同样,对于数字,输入9876543210。所有指定的值将用于生成随机强密码。
提示(TIP): 使用 ASCII 字符创建更强的密码和密码。
添加公式(Add Formulas)以生成随机强密码(Random Strong Password)
在为随机密码生成器创建工作表的基本结构之后,接下来就是主要任务了。您必须使用公式才能生成随机的强密码。
首先,使用D8( D8)单元格中的以下公式,使用大写、小写、数字和特殊字符的所有值生成一个字符串:
=IF(C4="Yes",D4,"") &IF(C5="Yes",D5,"") &IF(C6="Yes",D6,"") &IF(C7="Yes",D7,"")
上面的公式将从所有定义的字段中创建一个包含所有字符的字符串,如下面的屏幕截图所示。
现在,要从所有字符生成随机值,请在C10单元格中输入以下公式:
=MID(D8,RANDBETWEEN(1,LEN(D8)),1)
该公式只会生成一个值,如下面的屏幕截图所示。
接下来,要生成一长串强密码,您将不得不使用“ & ”重复上述公式字符串多次。例如,如果要生成一个包含 3 个字符的随机值,则必须在每个公式之间使用“&”重复使用它 3 次。您的公式将类似于以下公式:
=MID(D8,RANDBETWEEN(1,LEN(D8)),1)&MID(D8,RANDBETWEEN(1,LEN(D8)),1)&MID(D8,RANDBETWEEN(1,LEN(D8)),1)
因此,只需复制随机数生成器公式,在第一个字符串后添加一个“&”,然后将其多次粘贴到函数(Function)栏中。请记住,等号 (=) 只会出现在公式的开头。
最后,按Enter按钮,它将在C10单元格中生成一个随机的强密码。
您现在可以选择C10(密码)单元格,然后按Shift+F9快捷键再次重新生成新的随机强密码。并且,随心所欲地进行多次。
在本教程中,我分享了使用 Excel 内置公式库在Excel中生成随机强密码的步骤。(Excel)您可以按照这些步骤在Excel中生成任意数量的强密码,而无需外部附加服务。
现在阅读(Now read):如何在 Microsoft Excel 中使用自动数据类型功能(Automatic Data Type feature in Microsoft Excel)。
How to Generate a Random Strong Password in Excel
Strong passwоrds are needed to protect your electronic accounts from brute force attacks and other cуbеrattacks attempted by hackers. In thіs article, I am going tо shоw 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:
=MID(D8,RANDBETWEEN(1,LEN(D8)),1)
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:
=MID(D8,RANDBETWEEN(1,LEN(D8)),1)&MID(D8,RANDBETWEEN(1,LEN(D8)),1)&MID(D8,RANDBETWEEN(1,LEN(D8)),1)
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.