+ Reply to Thread
Results 1 to 4 of 4

Thread: random ABC

  1. #1
    Registered User
    Join Date
    08-30-2011
    Location
    indianapolis
    MS-Off Ver
    Excel 2003
    Posts
    2

    Unhappy random ABC

    Using my phone and can't seem to use the attachment feature. Hopefully I can ecplain it well enough.

    Im creating a worksheet for work, we have presses that have 3 stations (AB and C) and anywhere between 3 and 38 cavities. Every few hours a quality tech has to pull 5 random bottles from the press. I have been able to use the RAND feature to get the random numbers for the cavities but can't figure out how to get the 3 stations (ABC) to work.

    The worksheet looks something like this

    Press. # of cavities.
    1. 24. 3. 21. 6. 9. 11. 4. 7. 22. 18. 12.
    2. 8. 3. 6. 2. 6. 8. 1. 2. 4. 1. 5.
    And so on

    The stations ABC need to show up in each colum in front of the numbers but in random order. It would be best if the ABC part could be in order but random like the following

    A3 A21 B6 C9 C11
    A3 B6 C2 C6 C8
    A7 A8 A14 C2 C22

    I used the RAND feature in each of the 10 columns from the number put into the # of cavities column.

    Any help would be greatly appreciated, thanks!!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,225

    Re: random ABC

    maybe this:

    =CHAR(65+INT(3*RAND()))&INT(3+35*RAND())
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Registered User
    Join Date
    08-30-2011
    Location
    indianapolis
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: random ABC

    That works great except that I need the numbers in each row generated from the number that is in the # of cavities column. What I posted earlier got messed up when I posted it.

    Each column looks like this

    Press #
    1
    2
    3
    And so on...

    # of cavities
    22
    14
    8
    and so on

    Each row of random numbers need to be generated from the number that is in the cavites column. For example the first row can only have numbers 1-22, row 2 can only have numbers 1-14. Thanks for all the help!!

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,225

    Re: random ABC

    Instead of RAND() you can use RANDBETWEEN(1, A2) where A2 is your cavitie...

    So something like: =CHAR(65+INT(3*RAND()))&RANDBETWEEN(1, A2))

    also randbetween function is used so make sure you have the analysis toolpack addin activated tools/options/add ins check the analysis toolpack box
    "Relax. What is mind? No matter. What is matter? Never mind!"

+ 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.2.0