+ Reply to Thread
Results 1 to 4 of 4

I WANT TO ADD A TWO RANDOM CHARACTER SEQUENCE TO A SET OF ROWS

  1. #1
    XLSUSER
    Guest

    I WANT TO ADD A TWO RANDOM CHARACTER SEQUENCE TO A SET OF ROWS

    I WANT TO ADD TWO RANDOM CHARACTERS TO ROWS IN A TABLE THAT ARE UNIQUE SUCH
    AS AB, AC, AD, AF, ETC..

    CAN THIS BE DONE IN EXCEL?


  2. #2
    Max
    Guest

    Re: I WANT TO ADD A TWO RANDOM CHARACTER SEQUENCE TO A SET OF ROWS

    Assuming duplicates are not an issue,
    Try: ="A"&CHAR(RANDBETWEEN(65,90))
    Copy across or down as required

    As randbetween is used, ensure that the Analysis Toolpak is installed and
    activated. Check the "Analysis Toolpak" box (via Tools > Add-Ins)
    Chip Pearson's page has details on the ATP at:
    http://www.cpearson.com/excel/ATP.htm
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "XLSUSER" <[email protected]> wrote in message
    news:[email protected]...
    > I WANT TO ADD TWO RANDOM CHARACTERS TO ROWS IN A TABLE THAT ARE UNIQUE

    SUCH
    > AS AB, AC, AD, AF, ETC..
    >
    > CAN THIS BE DONE IN EXCEL?
    >




  3. #3
    Max
    Guest

    Re: I WANT TO ADD A TWO RANDOM CHARACTER SEQUENCE TO A SET OF ROWS

    If there should be no duplicates generated
    (i.e. all 26 random possibles: AA to AZ must be unique)
    here's one set-up to try

    Using say, the rightmost 2 columns, IU & IV
    Put in IU1: =CHAR(ROW()+64)
    Put in IV1: =RAND()
    Select IU1:IV1, copy down to IV26

    Then within the same sheet:

    To generate down a column
    we could put in say A1:
    ="A"&INDEX(IU:IU,RANK(IV1,$IV$1:$IV$26))
    and copy A1 down as many rows as required (up to the max of 26 rows)

    Or, to generate across any row, we could put in say, A28:
    ="A"&INDEX($IU:$IU,RANK(OFFSET($IV$1,COLUMN(A1)-1,),$IV$1:$IV$26)
    and copy A28 across as many cols as required (up to the max of 26 cols)

    Pressing F9 will regenerate afresh
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  4. #4
    Max
    Guest

    Re: I WANT TO ADD A TWO RANDOM CHARACTER SEQUENCE TO A SET OF ROWS

    If there should be no duplicates generated
    (i.e. all 26 random possibles: AA to AZ must be unique)
    here's one set-up to try

    Using say, the rightmost 2 columns, IU & IV
    Put in IU1: =CHAR(ROW()+64)
    Put in IV1: =RAND()
    Select IU1:IV1, copy down to IV26

    Then within the same sheet:

    To generate down a column
    we could put in say A1:
    ="A"&INDEX(IU:IU,RANK(IV1,$IV$1:$IV$26))
    and copy A1 down as many rows as required (up to the max of 26 rows)

    Or, to generate across any row, we could put in say, A28:
    ="A"&INDEX($IU:$IU,RANK(OFFSET($IV$1,COLUMN(A1)-1,),$IV$1:$IV$26)
    and copy A28 across as many cols as required (up to the max of 26 cols)

    Pressing F9 will regenerate afresh
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "XLSUSER" <[email protected]> wrote in message
    news:[email protected]...
    > I WANT TO ADD TWO RANDOM CHARACTERS TO ROWS IN A TABLE THAT ARE UNIQUE

    SUCH
    > AS AB, AC, AD, AF, ETC..
    >
    > CAN THIS BE DONE IN EXCEL?
    >




+ 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