+ Reply to Thread
Results 1 to 3 of 3

Random option selection based on variable input

Hybrid View

  1. #1
    Registered User
    Join Date
    04-27-2009
    Location
    Somewhere, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    11

    Random option selection based on variable input

    I need an action to allow for the random selection of a predetermined series of number codes which represent a given letter.

    It is probably easier to look at the attached sheet and the previous discussion to see what I mean.


    Previous discussion:
    http://www.excelforum.com/excel-work...-of-cells.html
    Attached Files Attached Files
    Last edited by Icecycle66; 07-23-2009 at 01:20 PM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Random option selection based on variable input

    This is not fully tested, but it seems to be returning random results within the "letter range" of the input cell.

    =INDEX($B$4:B23,MATCH(D3,$A$4:A23,0)+RANDBETWEEN(1,COUNTIF($A$4:A23,D3))-1,1)


    Edit: I'e uploaded a revised workbook using conditional formatting to give a visual reference that that random value is, in fact, among those in the "letter range". Looks like the formula is working as you need. However, you do have some duplicate values appear in the different ranges.

    After making an entry in the input cell, press the F9 key to force a recalculation which will cause the random number to refresh, thus "cycling" through the possible values to return.
    Last edited by Palmetto; 07-23-2009 at 12:53 PM. Reason: Uploaded revised workbook

  3. #3
    Registered User
    Join Date
    04-27-2009
    Location
    Somewhere, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    11

    Re: Random option selection based on variable input

    Woohoo!!!!

+ 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