Results 1 to 3 of 3

Random option selection based on variable input

Threaded View

  1. #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

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