+ Reply to Thread
Results 1 to 8 of 8

Secret Santa

  1. #1
    Registered User
    Join Date
    06-11-2008
    Posts
    4

    Secret Santa

    Hi All,

    I'm trying create a secret santa excel spreadsheet for my extended family where people are randomly assigned to someone else. Easy, I hear you shout, you just need to order by random number.

    Not so! I'd like to avoid those within a nuclear family being allocated to each other. I'd thought of using VLOOKUP to check the family of the person who's been assigned by a randomn number, and using IF to check if that person is in the same family. By summing the results of this IF, I thought I would have a single value which I wanted to be zero. I could then use solver to look for order solutions which would give me a zero value. But solver doesn't seem able to do this.

    Does anyone have any ideas please? I have attached where I got to

    Thank you in advance,

    Tom
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    149

    Re: Secret Santa

    Best I can do w/out spending too much time is to set up an iteration. It does 4 passes, one for each family.

    Note: your ranking method didn't work because randbetween can result in duplicates. I used one column for rand and one column for rank to reduce the chance of duplicates.

    Keep pressing F9 to scramble the results. As long as you don't have an N/A in the "Test" column then you're good to go.

    Unfortunately, it's hard coded, but you can see the methodology (if you have a different number of families or family members).
    Attached Files Attached Files

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Secret Santa

    Another way.
    Attached Files Attached Files
    Last edited by shg; 10-25-2011 at 07:34 PM.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    06-11-2008
    Posts
    4

    Re: Secret Santa

    Thank you Masteff and shg, I will enjoy trying to understand what you did!

    Tom

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Secret Santa

    Update; added example without family constraint.
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Secret Santa

    Replacing the mysteriously-disappeared attachment
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-26-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Secret Santa

    Hi folks ... I have the same requirement, but for a family group of 32. I've tried to insert rows/columns into the last referenced s/s, but the outcome is clearly awry !! I would really appreciate some help here, thanks in advance !!EF798223 - Secret Santa - 32 people in scope - v0.00.xlsx

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Secret Santa

    @ istevens

    Welcome to the forum.

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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