Take data from an excel spreadsheet, manipulate the data to show all possible combinations of team of 6 years with the following criteria.
Combined salary must be greater the 25,000 but less than 50,000
There must be 1 QB, 1-2 RB, 1-2 WR and a total of 6 players
There can only be one CPT, all others are FLEX (Position.1)
Each 6 team roster can not have the same team member IE Chris Carson cant be both a CPT and FLEX position on the same team.
There must be at least one player from each team
I need all team combinations output to a csv/excel file in the following format, one team/line with the following headers on the top line.
CPTPosition1(CPT first to the left), NAME, ID, POSITION, DEPTH, TEAMABB, FLEX1 SAME INFO, FLEX2 SAME INFO, TEAM TOTAL POINTS, TEAM TOTAL SALARY
Line 2 would have the second team
I expect the code to have clear explanations the purpose of each line in case I need to modify/debug it in the future. Thank you
This is actually an NFL Compiler. Minor point.
But I did want to correct a typo. From the first line, "team of 6 years" should be "team of 6 members"
Also, There must be 1 QB, 1-2 RB, 1-2 WR, 3-4 RB+WR, and 6 players total. Thank you.