View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2258_] Rick Rothstein \(MVP - VB\)[_2258_] is offline
external usenet poster
 
Posts: 1
Default taking characters from last name and first name to create a passwo

Since you posted this in a programming newsgroup, I'm assuming you want VB
code...

PW = Left(Range("B1"), 1) & Left(Range("A1"), 3) & (Int(10 * Rnd()) + 1)

Rick


"Juan" wrote in message
...
I need to create a password based on the first letter of the first name and
the first 3 letters of the last name along with a random number 1-9 at the
end. How can i do this? C1 below is where i want to enter the formula to
create the password.
thanks.

Example:
A1 B1 C1
LN FN New Password
Smith John Jsmi3