Evenly Distribute Players between 2 teams in Excel - excel

I have a group of players, 915 in total, each with different engagement scores that I am trying to break out into two evenly distributed groups based on their engagement scores. I tried using Solver in excel to set contstraints, indices etc, but unfortunately Solver can only handle 200 variables, and I have 915. Another approach I researched is to give the first group with the best player also the worst player, give the second group the second best player and the second worst player, and so on. Problem is I am not an excel wiz and need some help writing out this formula in excel so both columns A and B show "1's" for the agents that should be selected for both groups in the group A and group B columns in the below screenshot (the screenshot is a small sample of the entire data set, FYI),
Screenshot Here

As you mentioned combination of best and worst player.
Your data is already sorted on descending index. Say, the data is in A,B and C Columns. Just put A in D2 and B in D3.
Select D2 and D3 and once you get + cursor on the bottom right of the selection, double click.
Filter A for group A and B for group B.

Related

Tableau Reference Line on a Table

I am trying to put a reference line on a table that shows a ranking by point.
for example, if 10 teams are ranked by points, and only the top 3 teams advance to the next round, I want to draw a red line between 3rd and 4th teams.
I researched a lot and found there is no conventional way to do this (Please let me know how if I am wrong).
My one workaround idea was to split 1st-3rd teams (1st sheet) and 4th-10th teams (2nd sheet). Then, when I put them on a dashboard, place a blank sheet (filled with red color and 1pt height) between the 1st and 2nd sheets that are placed vertically.
However, the problem with this approach is that when I split the rank, then the rank column is messed up because of the filter. So, if I want to stick with this approach, I should figure out how I can rank the entire 10 teams regardless of the filter.
To summarize, I guess there are three parts to this question.
1) Is there a conventional way to put a red line on a table?
2) How can I rank teams by point regardless of the filter that was used to split the teams into two?
3) Is there any other ways to solve this?
Your approach seems good to me and this is what it would look like using the traditional superstore:
Probably I'm missing youre second point related to filtering the ranking column.
In my example I'm using the table calculation "rank" in order to have a dynamic value.
Can you elaborate more on this topic?
UPDATE
For reference, this is how the first worksheet is built: using a table calculation based on sales (triangle sign) as a filter for the rank from 1 to 3.
The same has been done for the second worksheet, filtering from rank 4 on:

Snapshot of Achievement Levels by Date

Expected Output Image Expected Output Image1. I have a spreadsheet with a list of dates when student signed-up for lessons (Column A). Note: Sometimes multiple students sign up on the same day.
2. The sheet also contains the dates when the students attained certain Proficiency levels (Columns B through F).
3. I would like to know retroactively (on any given sign-up date) how many students I had at each of the various proficiency levels.
4. If they have not yet achieved a Level of Proficiency I do not wish to include them in my categorical proficiency level counting.
So, in my example/link above, my output for the Sign-up date of 11/7/1996, should be that I had: (1) Student at Level 6 (3) Students at Level 3 (2) Students at Level 4. Would anyone have some ideas how to achieve this?
What I have started is the following in Column "I" and then dragging down. However I am not getting accurate counts (the accurate counts in columns "I" through "M" in my attachment link). If I could achieve accurate counts w/my present formula, I could use a similar formula in columns J,K,L and M etc. =COUNTIFS($B$2:B8,"<="&A8,$C$2:C8,">"&A8)+(COUNTIFS($B$2:B8,"<="&A8,$C$2:C8,"<>")))

Show on PivotChart... sum of two fields

OK, let's say I have this PivotChart:
I have a excel sheet of football matches and I watch to see the highest scoring team but it only does either home or away and I want to combine the two... how can I do that on my PivotChart fields?
I suggest inserting a column immediately to the right of B say labelled GSum with:
=SUMIF(F:F,B2,E:E)+SUMIF(B:B,B2,D:D)
in C2 and copied down to suit. In the PT add a Calculated Field, say Goals with =SUM(GSum)/2 and Sum of Goals at the bottom of Σ Values.
With luck on refresh the results might be similar to shown in this simplified example:
Note that, for example, C has not scored at home (so no blue) but has had three goals scored against it at home (brown). You might prefer the latter to indicate how many goals C has scored away (ie 4 - the same as it has scored in total) instead.

Excel Solver Using Strings

I'm going to try to explain this the best that I can.
Right now I have a spreadsheet with a list of football players, each of which has an assigned salary and projected point total for the week.
My goal is to use Solver or some other method to determine the best combination of players to maximize the projected point total while staying under a salary cap.
In this example I have 4 separate player lists, like this:
QB: Player A, Player B, Player C...Player N
RB: Player a, Player b, Player c...Player N
WR: Player X, Player Y, Player Z...Player N
TE: Player x, Player y, Player z...Player N
I need the best combination that includes 2 QBs, 2 RBs, 2 WRs, 1 TE, and 2 "Flex", which means any of RB/WR/TE.
I have tried using Solver to maximize the projected point total, but the variable fields in this case would be the Player's Names and it seems like the variable field needs to be a number, not a list of strings.
Any ideas?
My favorite kind of question :)
Here is the model setup:
Top table shows the decision variables: = 1 if player i = A, B, ..., N of list L = QB, .., TE is selected, =0 otherwise.
Entries in column R, (next to the top table) are the sums of each row. These must be constrained with the numbers in column T. Cell R7 is the total sum of players, which should be 9: 2 flexible and 7 as per the individual list requirements.
Middle table shows the salaries (randomly generated between 50,000 and 150,000). The Sum of Salaries formula is =SUMPRODUCT(C11:P14,C3:P6). The idea here is that only the salaries of players that are selected are taken into account. This SUMPRODUCT should be constrained with the budget, which is in cell T14. For my experiment, I put it equal to 80% of the total sum of all salaries.
Objective: Bottom table shows the projected points for each player. The formula in cell R22 is =SUMPRODUCT(C19:P22,C3:P6) (same logic as with salaries above). This is the value to be maximized.
Solver Model shown below:
I suggest selecting Simplex LP and going to Options and setting the Integer Optimality to zero (0).
Result:
Solver manages to find an optimal solution. The problem is really small and it is very quick. Solver works with up to 200 variables and 100 constraints, for large problems you will need the (commercial) extended version:
Of course, you can just order the real player names so that they fit this setting. For example, if you sort the players of each list alphabetically, then (Player A, QB) = first player of team QB, etc.
I hope this helps! Let me know if you would like me to upload the file for you.
Best,
Ioannis
Excel's solver is built on numerical methods. Applying to a domain that consists of discrete values, like strings or football players is probably going to fail. You should consider writing a brute force solver in a "real" programming language, like c#, java, python, ruby, or javascript. If there are performance problems, then optimize from there.
Solver won't work here because it's not a numeric solution you're after.
Make a spreadsheet that has every possible combination of position players (that meet your criteria) on each row. Then make an Excel formula that calculates projected point total based on the players in that row. Sort the spreadsheet by your projected point column.

Picking top 5 scores from a range

I run a small golf eclectic with excel. One of the things we have is a points system. I would like to get the 5 highest points scored over the season and have them ranked from 1 (being the highest points scored) to 5.
My knowledge of excel "sums" goes only a wee bit further than add and subtract.
Thanks!
If you don't want to change the order that they are presently in you can use the LARGE function. It returns the kth largest value.
Below is a great formula, if you drag it down it will automatically get the second, third and nth largest value from a table of data (in this example the data is between A1 to A10).
=LARGE(A1:A10,ROW(A1)-ROW($A$1)+1)
You can then match the values with names or corresponding data from the tables using the MATCH and INDEX functions. The example below would fetch the name for each value from the second column.
=INDEX($A$1:$B$10,MATCH(cell reference with score or value,$A$1:$B$10,2))
Play around with these formulas, they are very convenient for data m
If you have a column containing the scores, you could add a filter (Data->Filter I think) and sort descending.
Though, if you just have rows that are something like [Date][Person][Score] you'll need to go to another sheet and SUM the scores for each person then sort that... Unfortunately my Excel skills aren't up to par to pull a score for each person like that.
Given a list of numbers in A1 to A10, you can work out their 'Rank' relative to each other by using 'RANK'.
e.g.
RANK(A1,A1:A6,0)
RANK(cell, list of cells to check against, order)
For order, 0 = descending.
From there you can work out which one is first pragmatically.
If you have Excel 2007,
Check that your data is continuous, with no blank rows or columns. Click on your scores and then select 'Data - Filter'
Using the dropdown that the filter creates at the top of your scores column and select 'Number filters - Top ten'
A 'Top ten Autofilter' dialog will be displayed, reduce the show 10 to 5 and then click on OK.
For earlier versions of Excel add a RANK formula in a new column. Be careful as the scores need to be sorted, usually into descending order. If there are any ties, they will be given the same ranking number and the subsequent rank number will be incremented by the number of ties. (E.g. If there are two scores of 2, ranked as 5. The next score will be ranked as 7, not 6)
If you want to use the LARGE Function as described above, make sure you put the same range in the list for each of the LARGE functions. That is, change =LARGE(A1:A10,ROW(A1)-ROW($A$1)+1) to =LARGE(A$1:A$10,ROW(A1)-ROW($A$1)+1) or you will get some strange incorrect results

Resources