Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default taking characters from last name and first name to create a passwo

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default taking characters from last name and first name to create a passwo

didn't type this in and test, but try this:

mid(A1,1,1) & mid(B1,1,3) & Trim(int(RND(0)*10))

something like that anyway...



"Juan" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default taking characters from last name and first name to create a passwo

Hi

=LEFT(B1,1)&LEFT(A1,3)& RANDBETWEEN(1,9)

Regards,
Per

"Juan" skrev i meddelelsen
...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default taking characters from last name and first name to create a passwo

=Left(B1,1)&left(A1,3)&trunc(rand()*9+1)

but each time you calculate, the number will change.

--
Regards,
Tom Ogilvy



"Juan" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default taking characters from last name and first name to create a pa

=LEFT(B1,1)&LEFT(A1,3)&MID(RAND(),3,1)

What's RANDBETWEEN? Not in Excel 2003

"Per Jessen" wrote:

Hi

=LEFT(B1,1)&LEFT(A1,3)& RANDBETWEEN(1,9)

Regards,
Per

"Juan" skrev i meddelelsen
...
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



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default taking characters from last name and first name to create a pa

What's RANDBETWEEN? Not in Excel 2003

It requires the Analysis ToolPak add-in to be loaded.

Rick
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default taking characters from last name and first name to create a passwo

Thanks Tom, Per and Charlie. All of yours work perfectly. This made things so
much easier for me.

"Juan" wrote:

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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default taking characters from last name and first name to create a pa

Just a heads up,

Int(10 * Rnd()) + 1

generates random numbers between 1 and 10 inclusive vice the 1-9 asked for.

--
Regards,
Tom Ogilvy


"Rick Rothstein (MVP - VB)" wrote:

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



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default taking characters from last name and first name to create a pa

I guess I typed that too fast... thanks. Although, based on his last
posting, the OP appears to not want a VB solution (even though he posted to
a programming newsgroup), here is the corrected formula for the archives...

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

Rick


"Tom Ogilvy" wrote in message
...
Just a heads up,

Int(10 * Rnd()) + 1

generates random numbers between 1 and 10 inclusive vice the 1-9 asked
for.

--
Regards,
Tom Ogilvy


"Rick Rothstein (MVP - VB)" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Change link source requiring multiple entry of passwo Glen Miller Excel Worksheet Functions 0 December 4th 09 09:06 AM
Taking specific rows from on workbook to create another workbook Michelle Excel Worksheet Functions 1 May 12th 07 04:54 AM
Taking 10 lefthand characters in a cell keri Excel Programming 2 January 14th 07 12:03 PM
Check for Sheet Password Protected, Unprotect with multiple passwo David Excel Programming 2 June 21st 06 06:19 PM
How can i unprotect a workbook in Excell when I forgot the passwo. Kevin1961 Excel Worksheet Functions 2 October 29th 04 08:58 AM


All times are GMT +1. The time now is 09:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"