Random Passwords and usernames

rbsmit02

Board Regular
Joined
Jun 18, 2004
Messages
142
I have 500 agents trained on a new tool.
I need to create usernames and passwords for them as I am the admin of this tool.

What I need is thus:
column 1 contains first name space last name.
I want column 2 to format the name to a string in the format first initial last name (ray smith = rsmith).

In the third column I need to generate a random password between 6 and 8 charicters with at least 2 letters in the password.

Any pointers on how to do this?
this project needs to take very little of my time so I do not care what type of solution it is.... VBA or formula
 
I am trying to do something similar without any external addins though and I am only looking to create a random password generator thats alphanumeric.

Oaktree said:
Here's a "rough draft" shot at the random password:

o2:eek:37 houses the numbers 0-9 and the letters A-Z.

C2: =RANDBETWEEN(6,8)
D2: =IF($C2>=D$1,OFFSET($O$1,RANDBETWEEN(1,36),0),"")
L2: =D2&E2&F2&G2&H2&I2&J2&K2
M2: =IF(SUM(ISNUMBER(VALUE(LEFT(L2,1)))+ISNUMBER(VALUE(MID(L2,2,1)))+ISNUMBER(VALUE(MID(L2,3,1)))+ISNUMBER(VALUE(MID(L2,4,1)))+ISNUMBER(VALUE(MID(L2,5,1)))+ISNUMBER(VALUE(MID(L2,6,1)))+ISNUMBER(VALUE(MID(L2,7,1)))+ISNUMBER(VALUE(MID(L2,8,1))))<C2-2,"yes","no")
Book13
CDEFGHIJKLMNO
1length12345678fullvalid?
26XCXSFZ  XCXSFZyes0
31
42
53
64
75
86
97
108
119
12A
13B
14C
15D
16E
Sheet1
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hello,
tcg2k5 said:
I am trying to do something similar without any external addins though and I am only looking to create a random password generator thats alphanumeric.
Very good. What's the question then?

There are native solutions that do not require Add-ins posted to this thread, including the solutions mentioned by Tushar and I.

Incidentally, the UDF I posted is a good example of how native VB[A] algorithms can be extremely efficient... :)

The spreadsheet you quoted does use the Analysis Toolpak, a 3rd party Add-in (for Randbetween() ).
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,948
Members
449,198
Latest member
MhammadishaqKhan

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