I am currently working on a sports template prediction for the upcoming Euro 2020. I haven't gotten that far yet but below is an example of a group. So the "Tecken" column says which team won the game, if there is a 1 there the home team won, if there is a X there it was a draw and if it's a 2 there the away team won. What I would like to do is have a formula in the points column in the second table that checks which is the home team playing and if there is a 1 under the "tecken" column add 3 points to the points table. And if there is a X I would like to add 1 points for that team. I also need to do this for the away teams and add points (if there is a 2 in the "tecken" column) to the points table. Sorry for the bad explanation, is that clearer?
So for spain it would check the first game and see that spain is not playing. It would check the second game and see that spain is the home team and that there is a 1 in the "tecken" column and add 3 points to the points table and so on.
(GF is goals scored by each country and GA is goals scored against each country and GD is the goal difference)
You can use a formula with CountIFs. Conceptually:
Count how many times the Home team is Spain AND the Tecken is 1 and multiply by three
Count how many times the Home team is Spain AND the Tecken is X
Count how many times the Away team is Spain AND the Tecken is 2 and multiply by three
add these values together.
Something like this. Adjust the ranges to your sheet.
=(Countifs(C:C,K2,I:I,1)*3)+Countifs(C:C,K2,I:I,"X")+(Countifs(E:E,K2,I:I,2)*3)
Related
I need to compare how Fred is performing compared to the rest of his team Team 1 in the form of Pivot Line Graph. Below is the data.
A B C D
James Team 1 20 11/05/18
Fred Team 1 50 12/11/18
Elliott Team 2 100 21/04/18
Sarah Team 1 75 11/04/18
Fred Team 1 75 11/04/18
I need to create a Pivot Table from this data and then a Pivot Chart which shows a line graph for Team 1 and a line graph overlaid for Fred. The Team scores would be the average i.e. total of C Team As / No. of Team As.
The chart would have slicers attached to other Charts where a different Name or possible Team could be selected to filter.
I can create a chart for the names or for the teams but weighing a name against the team aggregate doesn't look possible.
Ok here it is, let me know if it solves your problem
Formula in E2 is
=AVERAGE(IF($B$2:$B$26=B2,IF($C$2:$C$26=C2,$D$2:$D$26)))
It is an array formula and have to be entered using Ctrl+Shift+Enter
The pivot table is as below
and the graph looks like this
Here is the pivot options window
Based on football data I am looking to create a league table which will give rankings of all the teams, the only difference is, each game week, teams will earn points based on the current ranking of the team they are playing.
So week by week, the excel document (with data added) will need to work out league position, work out who plays who, and then allocate points based on the result and the teams ranking of that week(which would be accumulated up to that week)
Ie, if Arsenal - Ranked 1st played Stoke Ranked 18 - and stoke won - Then the score stoke would receive for that week would be completely based on how high Arsenal was in the league..
This is a broad question, but I'll take a crack at answering it.
If you have a worksheet with ranking by week, say with team in col A then rank in each column thereafter, you could then refer to this with a relative cell reference. If you need the ranking to be calculated, that could be done on the weekly ranking sheet. A formula on a worksheet for points calculated might end up being something like:
='points'!b2/'weeklyrank'!b2
This would divide points by a team's rank in the prior week, thus awarding more points for higher ranked teams, assuming that is the objective. There are all kinds of ways to tweak this. Hopefully this gets you started.
If you have a question about how to calculate the rankings, I would post it as another question, but with more detail.
Sorry if this has been answered and I feel it may have but I am struggling to find an answer that helps me to the point of success.
I have a basic spreadsheet for time trial results. The spreadsheet is for both men and women. Basically, points are awarded for the quickest times throughout the entire competitors on 30 second intervals which is fine (Cloumn N)...(I have managed this)
My question is - On top of this the top 7 men in ranked position is awarded additional bonus points and the top 3 (only because there is normally less women attending the events than men) women are also additional awarded bonus points.
I have set up a column to specify M or F (Column C) when a competitor is added, and also using RANK
=IF(G7=0,0,RANK(G7,$G$6:$G$36,1)-COUNTIF($G$6:$G$36,0))
on the times - Column K
But I am really struggling with how to use a formula to extract the top 7 men and top 3 women and award the points. Ie there will be a 1st place man - 7th but also a 1st place woman - 3rd. So in essence is there any way I can extract the two sets of rankings from the identification of F and M from the appropriate column.
At the moment I can only get the a basic ranking and using an IF(AND) statement I can return results to apply the bonus points if the conditions are matched but this doesnt help with identifying the rankings according to Male (1st-7th) or Female (1st-3rd)
You can also see on my screen dump that although I havent added the formula for assigning the female points that because of the conditions been met I dont have bonus points awarded for 5th place because I set sex to F which I was hoping someone could also help me with
Sorry for waffling but I have been toiling with this 3 days now and I am just going in circles
Really appreciate any reply
Just use COUNTIFS:
=IF(G6=0,0,COUNTIFS(C:C,C6,G:G,"<" & G6,G:G,"<>0")+1)
This will rank the like entries in C, thus giving two 1st, one male and one female.
To add for the Club just add another condition:
=IF(G6=0,0,COUNTIFS(C:C,C6,G:G,"<" & G6,G:G,"<>0",B:B,B6)+1)
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.
I'm trying to create an average by category in a pivot table. This is the first time I've created a pivot table so sorry if the answer is staring me in the face. My raw data looks like:
Date, Transaction type, Description, Paid out, Paid in, Balance, Category
Mar-13, Visa, SHOP, £4.44, , £X, Gifts
Mar-13, Visa, SHOP, £5.00, , £Y, Children
Mar-13, Visa, SHOP, £6.00, , £Z, Gifts
Mar-13, Visa, CLOTHES SHOP YORK, £8.00, , £A, Clothing
Mar-13, Visa, FOOD SHOP, £11.96, , £B, Food
My pivot table shows the information rolled up by Month and grouped by a category:
Row Labels Sum of Paid out Sum of Paid in Sum of Difference
2013
Jan £Jan £Jan £C
Food 1 2 -
Car 2 3 -
Cash 6 6
Feb £Feb £Feb £D
Food 1 2
Car 8 0
Cash 2 3
The categories/data is made up in this case, but the desired outcome I'm after is to get an annual average, informing me how much comes in/out on average across the year per category... looking something like:
Row Labels Sum of Paid out Sum of Paid in Sum of Difference
2013
Avg £AvgIn £AvgOut £AvgDiff
Food 1 2 -
Car 5 1.5 -
Cash 4 4.5
Jan £Jan £Jan £C
Food 1 2 -
Car 2 3 -
Cash 6 6
Feb £Feb £Feb £D
Food 1 2
Car 8 0
Cash 2 3
Is this possible to achieve using a pivot table, as I can't seem to find a way to this at the moment using Excel 2010.
Since it appears that your raw data is already grouped by month, you're able to do this pretty easily. You need to re-arrange your data, however -- the months and the categories need to be on different axes. For example, Category as ColumnLabels, with Values then Month as Row Labels. Then right-click one of the normal values for Paid Out, choose "Summarize Value As...", you'll see SUM is currently checked, just change to AVERAGE. Repeat for one of the Paid In values. The labels should change to help let you know if it worked.
Note that this will NOT work effectively if your source data comes in daily, for example. With only one entry per month, the SUM and the AVERAGE of the single entry are identical. This would not be the case if your raw data was daily (and you still grouped by month) -- you'd be switching from a monthly total to a daily average.
I am currently using LibreOffice, which is just the free version of Excel on a mac. It is basically the same thing, but anyways, do you see the top bar where it says =AVERAGE(B8,C8,D8)? Well, that is how you can incorporate the functions within the table. This is actually a pivot table I had to do for my Java class. All you have to do is click on the cell you want to edit, type =, the function name, (in your case, AVERAGE should be fine) and then any other kinds of functions you use. Hope this helps you out.