+ Reply to Thread
Results 1 to 2 of 2

Random list constraint

  1. #1
    Registered User
    Join Date
    07-11-2011
    Location
    Groningen, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question Random list constraint

    I have been using Excel to produce random lists using a column for the set, one for a series of random numbers and one with the formula =INDEX($B$2:$B$21,RANK(A2,A$2:A$21)) where the A column is the random numbers and the B column the set.

    I am now looking for a way to enforce the rule (or to obtain the same result as enforcing such rule) to never have the same element repeated in two contiguous cells in the resulting column.

    I though of using predetermined blocks of 4 variables (my N is 16) and switching those, but 1) I don't know how to make something correspond to a block of cells and 2) also in that case there should be rules and alternative blocks.

    Anyone knows a solution, possibly that doesn't involve VBA and macros since I have no experience there?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Random list constraint

    im not sure what you mean the random should be enough so that it doesnt repeat for ranking purposes
    or are you saying col b has repeating data?
    try unique rank instead of rank
    http://www.cpearson.com/excel/Rank.aspx
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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