Can some one help me with a script that will run a loop or perhaps multiple nested loops, where the people seated in the 4 tables will meet each other at least once during the 4 sessions?
Thanks.
Can some one help me with a script that will run a loop or perhaps multiple nested loops, where the people seated in the 4 tables will meet each other at least once during the 4 sessions?
Thanks.
How many people are at each table?
Hi Ed_Collins, there are 6 people at each table.
Unless I'm missing something, it's not possible for everyone to meet everyone in just four sessions.
6 people per table x 4 tables = 24 participants. Lets label each participant A through X. (The first 24 letters of the alphabet.)
Assume A sits with B, C, D, E, and F during the first session.
Assume A sits with G, H, I, J, and K during the second session.
Assume A sits with L, M, N, O, and P during the third session.
Assume A sits with Q, R, S, T, and U during the fourth session.
As far as A is concerned, you can't get any more efficient than that. Notice he didn't sit with anyone twice. And yet he wasn't able to sit with V, W or X.![]()
Here's a solution for 7 rounds of 6 tables of 4 people by Harvey Warwick:
[[1, 2, 11, 21], [9, 10, 19, 5], [17, 18, 3, 13], [4, 7, 6, 24], [8, 12, 14, 15], [16, 20, 22, 23]]
[[1, 3, 12, 22], [9, 11, 20, 6], [17, 19, 4, 14], [5, 8, 7, 18], [2, 13, 15, 16], [10, 21, 23, 24]]
[[1, 4, 13, 23], [9, 12, 21, 7], [17, 20, 5, 15], [6, 2, 8, 19], [3, 10, 14, 16], [11, 18, 22, 24]]
[[1, 5, 14, 24], [9, 13, 22, 8], [17, 21, 6, 16], [7, 3, 2, 20], [4, 10, 11, 15], [12, 18, 19, 23]]
[[1, 6, 15, 18], [9, 14, 23, 2], [17, 22, 7, 10], [8, 4, 3, 21], [5, 11, 12, 16], [13, 19, 20, 24]]
[[1, 5, 16, 19], [9, 15, 24, 3], [17, 23, 8, 11], [2, 5, 4, 22], [6, 10, 12, 13], [14, 18, 20, 21]]
[[1, 8, 10, 20], [9, 16, 18, 4], [17, 24, 2, 12], [3, 6, 5, 23], [7, 11, 13, 14], [15, 19, 21, 22]]
Entia non sunt multiplicanda sine necessitate
Thanks Ed_Collins. Is there a VBA script that will loop through this and assign seating to 6 tables? Thanks.
See if the following link helps. shg (Post #5 above), helped to contribute to it, back in 2010.
http://www.mrexcel.com/forum/excel-q...ets-twice.html
Last edited by Ed_Collins; 07-01-2015 at 02:52 PM. Reason: typo
So I modified mighty mouse’s formula: Formula for random seating and MrExcel MVP's formula: Wedding Seating Chart.
In column B I randomly selected numbers using the formula =LARGE(ROW($1:$24)*NOT(COUNTIF($B$1:B1,ROW($1:$24))),RANDBETWEEN(1,24+1-ROW(B1))).
Then in column C I manually listed 1 through 6 (C1:C7) and followed the formula =LARGE(ROW($1:$24)*NOT(COUNTIF($C$1:C7,ROW($1:$24))),RANDBETWEEN(1,24+1-ROW(C7))) dragged it all the way to C25 for a count of 24 people.
In column D I incremented column C2:C7 by 2,3,4,5,6,7, so C2 = 1 +2, which makes D2 = 3, C3 = 2 + 3, which makes D3 = 5. I did this all the way to D7 = 13. Then I used the formula =LARGE(ROW($1:$24)*NOT(COUNTIF($D$1:D7,ROW($1:$24))),RANDBETWEEN(1,24+1-ROW(D7))) and dragged it all the way to D25 for a count of 24 people.
In column E I incremented column D2:D7 in the same way, by 2,3,4,5,6,7, so D2 = 2 + 2, which makes E2 = 4, D3 = 5 +3, which makes E3 = 8. I did this all the way to E7 = 20. Then I used the formula =LARGE(ROW($1:$24)*NOT(COUNTIF($E$1:E7,ROW($1:$24))),RANDBETWEEN(1,24+1-ROW(E7))) and dragged it all the way to E25 for a count of 24 people.
Seating_24.png
Last edited by hoshangc@yahoo.com; 07-07-2015 at 04:36 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks