+ Reply to Thread
Results 1 to 8 of 8

How to generate a unique random 8 character string for each row in a column?

  1. #1
    Registered User
    Join Date
    04-28-2006
    Posts
    51

    How to generate a unique random 8 character string for each row in a column?

    Hi,

    I was wondering how I could randomly generate a string of 8 characters
    (letters and numbers) down a column and have each row unique.

    What I'm trying to do is assign a random 8 character password to a few hundred user names in a new column beside the user name.


    Thanks!

    Dino

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    The chances of 2 people having the same password is remote as there are potentially up to 4,304,672,100,000,000 different combinations

    perhaps I would put the following formula in a cell and copy it down for all the number of rows I need a password for (plus a few extra in case there is a duplicate)

    =CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))

    then copy this somewhere else as values as it changes evry time u recalculate

    then filter this list using the advance filter and choosing unique values, they can then be copied to the side of the staff you wish to have a password for.

    Does that help

    Regards

    Dav

    Nb I have included upper and lower case and punctuation characters as you did not specify what are valid characters
    Last edited by Dav; 08-22-2007 at 03:54 AM.

  3. #3
    Registered User
    Join Date
    04-28-2006
    Posts
    51
    Hi Dav,

    Thanks thats perfect =)

    Have a great night.

  4. #4
    Registered User
    Join Date
    08-23-2007
    Posts
    1
    Hi Dav,

    This is exactly what I was looking for, well almost!

    I just want letters & numbers, alphanumeric, no symbols (* ; ' etc.)

    I know the *90+33 has something to do with it but I'm not sure what to do, can you help.

    Many Thanks

    Kevin

    Quote Originally Posted by Dav
    The chances of 2 people having the same password is remote as there are potentially up to 4,304,672,100,000,000 different combinations

    perhaps I would put the following formula in a cell and copy it down for all the number of rows I need a password for (plus a few extra in case there is a duplicate)

    =CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))&CHAR(TRUNC(RAND()*90+33))

    then copy this somewhere else as values as it changes evry time u recalculate

    then filter this list using the advance filter and choosing unique values, they can then be copied to the side of the staff you wish to have a password for.

    Does that help

    Regards

    Dav

    Nb I have included upper and lower case and punctuation characters as you did not specify what are valid characters

  5. #5
    Registered User
    Join Date
    04-28-2006
    Posts
    51
    Actually I'd like to know how to do that as well. Same thing but without Symbols. Does anyone know how to do this as well by chance?

    Thanks!

    Dino

  6. #6
    Forum Contributor
    Join Date
    09-25-2004
    Posts
    269
    List your numbers and letters in column A and then input this formula in cell B2 and copy down.

    =INDEX($A$1:$A$352,RANDBETWEEN(1,35))

    I Left a sample workbook below.

    Hope it helps!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-28-2006
    Posts
    51
    Thanks great idea =)

    I looked at your workbook and tried it myself and get this showing in all the fields: #NAME?

  8. #8
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by Dno
    Thanks great idea =)

    I looked at your workbook and tried it myself and get this showing in all the fields: #NAME?
    To use the RANDBETWEEN function you will need to add the Analysis Tool Pak

    http://office.microsoft.com/en-gb/ex...277241033.aspx
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1