The forum cut me off so I will try to post how to assemble the Numbers document now:
There are several tables as shown below:
/***********************************************/
The first table is titles "Players" and is where you enter the names of each player. The first row is a header. For convenience put the following formula
A2=ROW()-1
select A2 and fill down as needed. This will make the first column update automatically if you expand the table.
Enter names as needed.
/***********************************************/
The second table is the table where you will paste results from running the command line application in the terminal.
You just need a table to exist so make a table with a header row as shown. Be certain to delete the contents of NON-HEADER rows before pasting in new data. You DO NOT need to type all those number into the cells in rows 2 and on
/***********************************************/
The third table is "Facility set up" where you enter information regarding the season, number of player, and Number of courts.
B4=MAX(Paste Set Up Here :: B)
cell B2 is set up as a pop-up menu that contains two entries: "Single", and "Double":
/***********************************************/
An finally...
The table "Schedule" is made as follows:
row 1 is a header.
C1=IF(COLUMN()-3<Facility set up :: $B$1, "Court "&COLUMN()-2, "")
select C1 and fill to the right as needed (I went all the way out to column L)
A2=INT((ROW()-2)/Facility set up :: $B$4)+1
B2=IF(A2<=Facility set up :: $B$3, MOD((ROW()-2), Facility set up :: $B$4)+1, "")
C2=IFERROR(IF(C$1<>"", IF(Facility set up :: $B$2="Single", VLOOKUP(INDIRECT("Paste Set Up Here :: "&CHAR(CODE("C")+2*(COLUMN()-3))&ROW() ), Players :: $A:$B, 2, 0)&" vs "&VLOOKUP(INDIRECT("Paste Set Up Here :: "&CHAR(CODE("C")+1+2*(COLUMN()-3))&ROW() ), Players :: $A:$B, 2, 0), "("&VLOOKUP(INDIRECT("Paste Set Up Here :: "&CHAR(CODE("C")+0+4*(COLUMN()-3))&ROW() ), Players :: $A:$B, 2, 0)&" & "&VLOOKUP(INDIRECT("Paste Set Up Here :: "&CHAR(CODE("C")+1+4*(COLUMN()-3))&ROW() ), Players :: $A:$B, 2, 0)&") vs ("&VLOOKUP(INDIRECT("Paste Set Up Here :: "&CHAR(CODE("C")+2+4*(COLUMN()-3))&ROW() ), Players :: $A:$B, 2, 0)&" & "&VLOOKUP(INDIRECT("Paste Set Up Here :: "&CHAR(CODE("C")+3+4*(COLUMN()-3))&ROW() ), Players :: $A:$B, 2, 0)&")"), ""), "")
select C2 and fill to the right as needed (I went out to column L)
now select A2 thru L2 and fill down.
This is a lot, so please post back if you have comments, or questions.
Best regards,
Wayne