Is there a way to generate usernames and passwords using excel 07

P

Pete_UK

Of course there is - you just need to decide on a set of rules to
generate them. Things to consider, for example, include fixed length
or variable length, case sensitivity, valid characters, mixtures of
characters (eg must contain at least one numeric character).

You might already have allocated these in the past, and so you have a
naming convention already which you would like to code within Excel -
let us know what that is with a few examples.

Pete
 
C

Chip Pearson

Your question is overly vague. Exactly what sort of user names, and in what
format should they be and is there any "template" that describes what a user
name and password should look like? I mean, at the simplest, you could have

Dim UName As String
Dim PassWord As String

UName = "abc"
PassWord = "xyz"

This satisfies your question as it was written, but I suspect you have
something more in mind. Detail are important.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
A

Avelmine

I'm sorry. To continue I have first names in column B and last names in
Column C. Username in Column D and Passwords in Column E.

I would like to have the usernames made up of the first letter of the first
name and the first 7 letters of the last name. I would then like the
passwords to be the first and last initial followed by a random 6 digit
number. Also I would like the last initial to be uppercase.
 
P

Peo Sjoblom

What if the last name is Smith, the whole name? With the first names in A
and the last in B

=LOWER(LEFT(A1))&LOWER(LEFT(B1,7))

if you don't want lower case just remove the 2 LOWER function calls and
appropriate parenthesis



=LOWER(LEFT(A1))&LOWER(LEFT(B1))&TRUNC(RAND()*(1000000-100000)+100000)


however it's random within 100000 and 999999, if you want it to be possible
to create a number like

000002 then you could use

=LOWER(LEFT(A1))&LOWER(LEFT(B1))&TEXT(TRUNC(RAND()*(1000000-1)+1),"000000")


and it will change for each calculation so I would suggest that you copy
down as long as needed and then copy and paste special as values in place,
same with the user names so they become static and independent of the
formulas


--


Regards,


Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top