Hello Team,
Here is the Problem Statement, please help to resolve this:
<colgroup><col><col span="11"></colgroup><tbody>
</tbody>IMP:
<colgroup><col span="12"><col></colgroup><tbody>
</tbody>
Per Team Composition:
Batsman 4
Bowler 3
All Rounder 4
Player Statistics:
<colgroup><col span="7"></colgroup><tbody>
</tbody>
Here is the Problem Statement, please help to resolve this:
Problem Statement: We need to select the best team for EACH STATE Given a set of player information, some selection criteria and the required number of players at each position as input,automatically mark whether a player is selected or not for his state team The worksheet should automatically handle the following changes: - Changes in team composition (Number of Batsman, Number of Bowlers and Number of All Rounders) - Addition of more states in the dataset - Changes in the data set (Batting Averages / Wickets and Wicketkeeper flag) | ||||||||
Selection Criteria: - There has to be one wicketkeeper-batsman in the team. In case there are multiple candidate wicketkeepers in the state, the one with highest batting average is selected. - Select the remaining number of required batsmen in a decreasing order of their batting averages. - Select the required number of bowlers in the decreasing order of wickets/match. - Select the allrounders based on the formula (Batting average + 5*wickets/match). The higher this value, the better the allrounder and needs to be chosen |
<colgroup><col><col span="11"></colgroup><tbody>
</tbody>
1) To get the selected players, you should write VBA macros which populate the value of isSelected | |
- If needed, you can add columns to the right of isSelected which would help you in the processing | |
2) The submitted solution should be generic so that it should work on changing the Player Info and the required team composition |
<colgroup><col span="12"><col></colgroup><tbody>
</tbody>
Per Team Composition:
Batsman 4
Bowler 3
All Rounder 4
Player Statistics:
Player Name | State | Position | Batting Average | Wickets / Match | IsWicketKeeper | IsSelected |
P1 | Maharashtra | Batsman | 34 | 0 | 1 | |
P2 | Maharashtra | Batsman | 32 | 2 | 1 | |
P3 | Maharashtra | Batsman | 30 | 0 | 0 | |
P4 | Maharashtra | Batsman | 24 | 1 | 0 | |
P5 | Maharashtra | Batsman | 50 | 0 | 0 | |
P6 | Maharashtra | Batsman | 50 | 0 | 0 | |
P7 | Maharashtra | Bowler | 22 | 3 | 0 | |
P8 | Maharashtra | Bowler | 21 | 2 | 0 | |
P9 | Maharashtra | Bowler | 6 | 3 | 0 | |
P10 | Maharashtra | Bowler | 10 | 4 | 0 | |
P11 | Maharashtra | Bowler | 15 | 4 | 0 | |
P12 | Maharashtra | Bowler | 5 | 3 | 0 | |
P13 | Maharashtra | Bowler | 14 | 2 | 0 | |
P14 | Maharashtra | Bowler | 19 | 4 | 0 | |
P15 | Maharashtra | All Rounder | 32 | 3 | 0 | |
P16 | Maharashtra | All Rounder | 13 | 2 | 0 | |
P17 | Maharashtra | All Rounder | 27 | 3 | 0 | |
P18 | Maharashtra | All Rounder | 14 | 2 | 0 | |
P19 | Maharashtra | All Rounder | 41 | 2 | 0 | |
P20 | Maharashtra | All Rounder | 15 | 3 | 0 | |
P21 | Karnataka | Batsman | 20 | 0 | 1 | |
P22 | Karnataka | Batsman | 21 | 0 | 1 | |
P23 | Karnataka | Batsman | 20 | 2 | 1 | |
P24 | Karnataka | Batsman | 21 | 0 | 0 | |
P25 | Karnataka | Batsman | 38 | 0 | 0 | |
P26 | Karnataka | Batsman | 45 | 0 | 0 | |
P27 | Karnataka | Bowler | 8 | 3 | 0 | |
P28 | Karnataka | Bowler | 21 | 3 | 0 | |
P29 | Karnataka | Bowler | 23 | 4 | 0 | |
P30 | Karnataka | Bowler | 21 | 2 | 0 | |
P31 | Karnataka | Bowler | 16 | 2 | 0 | |
P32 | Karnataka | Bowler | 9 | 4 | 0 | |
P33 | Karnataka | Bowler | 23 | 3 | 0 | |
P34 | Karnataka | Bowler | 23 | 3 | 0 | |
P35 | Karnataka | All Rounder | 18 | 2 | 0 | |
P36 | Karnataka | All Rounder | 30 | 2 | 0 | |
P37 | Karnataka | All Rounder | 14 | 4 | 0 | |
P38 | Karnataka | All Rounder | 41 | 2 | 0 | |
P39 | Karnataka | All Rounder | 22 | 2 | 0 | |
P40 | Karnataka | All Rounder | 34 | 3 | 0 | |
P41 | Karnataka | Bowler | 25 | 3 | 0 |
<colgroup><col span="7"></colgroup><tbody>
</tbody>