Consulting

Results 1 to 5 of 5

Thread: Permutation two

  1. #1
    VBAX Contributor
    Joined
    May 2008
    Posts
    109
    Location

    Permutation two

    Considered a given sequence of names in a column, for example a1= Mary, a2= Mark, a3= Nike, a4= jimmy ad so on for 31 rows it is possible to arrange a macro that can give any permutation of these names while leaving other names fixed in their positions.

    sasa

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I don't understand what you are after.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Contributor
    Joined
    May 2008
    Posts
    109
    Location
    May be my practical need can better explain what I mean. The four names are four workers and every day the are not necessarily present at work. So what I need is the possibility to obtain a sequence where considered that some days are present only one or two workers I can equally distribuite their work shift in the month. I need to alternate them in the best way possible. Infact if they are all avalable every day I can easy choice one among the four and alternate them every day, but if I have some day only one or two avalable I am forced to select these, so in the other days I'd like to select the others to obtain a correct distribution of the work shifts.
    I think that select the quatrain where I have a limited choice of the workers, I need a routine able to find all the other quatrains that better combine with this one.

    I don't know if my question has a solution.

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    Hi Sasa, Can you post your workbok so we can see what it is that you are trying to work with?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    This thread is directly related to this thread
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •