Excel Grid Matching Game

My wife is being asked to come up with a "Prayer Partner" list, containing 12 women, who pray over the course of 11 weeks, each one partnered with the other only once.  Person 1 is the "Leader" of the group.  I have matched Person 1 to each person in the group once.  Row 1 has the prayer partner.  Column 3 starts the matching at Row 2 (first week):

ExcelPrayerPattern.PNG
I cannot figure out a way to complete the pattern.  Basically, if Person 1 is assigned to pray with person 2 in week 1, person 2 needs to be assigned to person 1 in week 1, and so forth.  In the above, I have person 1 assigned to each prayer partner in turn, and consequently, each person assigned to person 1 in the appropriate week.

Will someone please help me?

DrU
LVL 31
Justin OwensITIL Problem ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

You have 12 people and 11 weeks. If they pray in pairs you have 6 pairs for each week.  Start with setting up prayer partners for person 1.

person 1 prays with person 2 first, and in the next weeks proceeds to take turns with each other person. That looks like this:
one
Notice how I filled in the first column as well. Underneath Person1 there is the Person number they are paired with in each week. In the first row you can see the numbers 2 and 1. Let's fill in the rest of the row with the other ten numbers.

shot2.png
3 pairs with 12 and 12 pairs with 3. Works out just fine.  

Let's fill in the same pattern for the remaining weeks, following the diagonal line of P1. Note that in some cases people would be paired with themselves, so we remove the value. These cells are highlighted in yellow.
threeFill in the start of the rows to complete the patterns and remove the numbers in cells where people are paired with themselves.
four
In week 2 we now see empty cells for P2 and P8, so we just pair these two. Similarly in week 4 we pair P3 with P9 and so on.
five
And that's it. Every person paired with every other person only once.

cheers, teylyn
0
Glenn RayExcel VBA DeveloperCommented:
^ Beat me to it!  I was going to refer you to a 12-member round robin schedule (several generators on the Internet), but this explanation is really good.
0
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Except, I just spotted the error of my ways. P2 is paired with 8 in week 2 and in week 8. In fact, all the highlighted cells have duplicate pairings.

back to the drawing board, but too tired for mega Sudoku now.
0
Top Threats of Q1 & How to Defend Against Them

WEBINAR: Join WatchGuard CTO and our Threat Research Team on Aug. 2nd to hear the findings from our Q1 Internet Security Report! Learn more about the top threats detected in the first quarter and how you can defend your business against them!

Justin OwensITIL Problem ManagerAuthor Commented:
teylyn,

I actually came up with that, until I realized that every one ended up duplicating and missing 1 person.  For example, in the above, person 2 never prays with person 12, 3 with 11, etc.  (person 4 and 10 in row 7 actually works).  With that pattern, though, I could never get it to quite work... I spend several hours trying to figure something out, so I appreciate that you got so close so quickly.

DrU
0
ozoCommented:
  1   2   3   4   5   6   7   8   9  10  11  12
  2   1  12  11  10   9   8   7   6   5   4   3
  3   4   1   2  12  11  10   9   8   7   6   5
  4   6   5   1   3   2  12  11  10   9   8   7
  5   8   7   6   1   4   3   2  12  11  10   9
  6  10   9   8   7   1   5   4   3   2  12  11
  7  12  11  10   9   8   1   6   5   4   3   2
  8   3   2  12  11  10   9   1   7   6   5   4
  9   5   4   3   2  12  11  10   1   8   7   6
 10   7   6   5   4   3   2  12  11   1   9   8
 11   9   8   7   6   5   4   3   2  12   1  10
 12  11  10   9   8   7   6   5   4   3   2   1

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ozoCommented:
The pattern may be more obvious presented this way:
 1  3  4  5  6  7
 2 12 11 10  9  8

 1  4  5  6  7  8
 3  2 12 11 10  9

 1  5  6  7  8  9
 4  3  2 12 11 10

 1  6  7  8  9 10
 5  4  3  2 12 11

 1  7  8  9 10 11
 6  5  4  3  2 12

 1  8  9 10 11 12
 7  6  5  4  3  2

 1  9 10 11 12  2
 8  7  6  5  4  3

 1 10 11 12  2  3
 9  8  7  6  5  4

 1 11 12  2  3  4
10  9  8  7  6  5

 1 12  2  3  4  5
11 10  9  8  7  6

 1  2  3  4  5  6
12 11 10  9  8  7

Open in new window

0
Justin OwensITIL Problem ManagerAuthor Commented:
ozo and teylyn,

Thank you both so much for the time and attention you put into this.  They have pushed back a week and will start next week.  One thing was asked.  It is actually two groups of 12 (24 total women), so as an interim solution i swapped 6 members of groups 1 and 2.  This caused 6 women to miss out on praying with 6 other women.

How difficult would it be to expand it to 24 x 24 instead of 12 x 12 and still not repeat?  If it is doable, I will ask a Related Question linked to this one.

DrU
0
ozoCommented:
for 24, just extend the pattern
 1  3  4  5  6  7  8  9 10 11 12 13
 2 24 23 22 21 20 19 18 17 16 15 14

 1  4  5  6  7  8  9 10 11 12 13 14
 3  2 24 23 22 21 20 19 18 17 16 15

 1  5  6  7  8  9 10 11 12 13 14 15
 4  3  2 24 23 22 21 20 19 18 17 16

 1  6  7  8  9 10 11 12 13 14 15 16
 5  4  3  2 24 23 22 21 20 19 18 17

 1  7  8  9 10 11 12 13 14 15 16 17
 6  5  4  3  2 24 23 22 21 20 19 18

 1  8  9 10 11 12 13 14 15 16 17 18
 7  6  5  4  3  2 24 23 22 21 20 19

 1  9 10 11 12 13 14 15 16 17 18 19
 8  7  6  5  4  3  2 24 23 22 21 20

 1 10 11 12 13 14 15 16 17 18 19 20
 9  8  7  6  5  4  3  2 24 23 22 21

 1 11 12 13 14 15 16 17 18 19 20 21
10  9  8  7  6  5  4  3  2 24 23 22

 1 12 13 14 15 16 17 18 19 20 21 22
11 10  9  8  7  6  5  4  3  2 24 23

 1 13 14 15 16 17 18 19 20 21 22 23
12 11 10  9  8  7  6  5  4  3  2 24

 1 14 15 16 17 18 19 20 21 22 23 24
13 12 11 10  9  8  7  6  5  4  3  2

 1 15 16 17 18 19 20 21 22 23 24  2
14 13 12 11 10  9  8  7  6  5  4  3

 1 16 17 18 19 20 21 22 23 24  2  3
15 14 13 12 11 10  9  8  7  6  5  4

 1 17 18 19 20 21 22 23 24  2  3  4
16 15 14 13 12 11 10  9  8  7  6  5

 1 18 19 20 21 22 23 24  2  3  4  5
17 16 15 14 13 12 11 10  9  8  7  6

 1 19 20 21 22 23 24  2  3  4  5  6
18 17 16 15 14 13 12 11 10  9  8  7

 1 20 21 22 23 24  2  3  4  5  6  7
19 18 17 16 15 14 13 12 11 10  9  8

 1 21 22 23 24  2  3  4  5  6  7  8
20 19 18 17 16 15 14 13 12 11 10  9

 1 22 23 24  2  3  4  5  6  7  8  9
21 20 19 18 17 16 15 14 13 12 11 10

 1 23 24  2  3  4  5  6  7  8  9 10
22 21 20 19 18 17 16 15 14 13 12 11

 1 24  2  3  4  5  6  7  8  9 10 11
23 22 21 20 19 18 17 16 15 14 13 12

 1  2  3  4  5  6  7  8  9 10 11 12
24 23 22 21 20 19 18 17 16 15 14 13

Open in new window

0
ozoCommented:
Maybe a little clearer written as:
 1 24 23 22 21 20 19 18 17 16 15 14
 2  3  4  5  6  7  8  9 10 11 12 13

 1  2 24 23 22 21 20 19 18 17 16 15
 3  4  5  6  7  8  9 10 11 12 13 14

 1  3  2 24 23 22 21 20 19 18 17 16
 4  5  6  7  8  9 10 11 12 13 14 15

 1  4  3  2 24 23 22 21 20 19 18 17
 5  6  7  8  9 10 11 12 13 14 15 16

 1  5  4  3  2 24 23 22 21 20 19 18
 6  7  8  9 10 11 12 13 14 15 16 17

 1  6  5  4  3  2 24 23 22 21 20 19
 7  8  9 10 11 12 13 14 15 16 17 18

 1  7  6  5  4  3  2 24 23 22 21 20
 8  9 10 11 12 13 14 15 16 17 18 19

 1  8  7  6  5  4  3  2 24 23 22 21
 9 10 11 12 13 14 15 16 17 18 19 20

 1  9  8  7  6  5  4  3  2 24 23 22
10 11 12 13 14 15 16 17 18 19 20 21

 1 10  9  8  7  6  5  4  3  2 24 23
11 12 13 14 15 16 17 18 19 20 21 22

 1 11 10  9  8  7  6  5  4  3  2 24
12 13 14 15 16 17 18 19 20 21 22 23

 1 12 11 10  9  8  7  6  5  4  3  2
13 14 15 16 17 18 19 20 21 22 23 24

 1 13 12 11 10  9  8  7  6  5  4  3
14 15 16 17 18 19 20 21 22 23 24  2

 1 14 13 12 11 10  9  8  7  6  5  4
15 16 17 18 19 20 21 22 23 24  2  3

 1 15 14 13 12 11 10  9  8  7  6  5
16 17 18 19 20 21 22 23 24  2  3  4

 1 16 15 14 13 12 11 10  9  8  7  6
17 18 19 20 21 22 23 24  2  3  4  5

 1 17 16 15 14 13 12 11 10  9  8  7
18 19 20 21 22 23 24  2  3  4  5  6

 1 18 17 16 15 14 13 12 11 10  9  8
19 20 21 22 23 24  2  3  4  5  6  7

 1 19 18 17 16 15 14 13 12 11 10  9
20 21 22 23 24  2  3  4  5  6  7  8

 1 20 19 18 17 16 15 14 13 12 11 10
21 22 23 24  2  3  4  5  6  7  8  9

 1 21 20 19 18 17 16 15 14 13 12 11
22 23 24  2  3  4  5  6  7  8  9 10

 1 22 21 20 19 18 17 16 15 14 13 12
23 24  2  3  4  5  6  7  8  9 10 11

 1 23 22 21 20 19 18 17 16 15 14 13
24  2  3  4  5  6  7  8  9 10 11 12

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.