Using the Rank Function In Excel - excel

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)

Related

Excel formula to find a number within a range of numbers and return a date

First time writing one of these, so I will try and explain what I'm trying to do in an understandable manner.
I'm trying to create a spreadsheet to track when a premium bond wins, and have it return the date that the winning premium bond was purchased. Because premium bonds cannot be purchased singularly, when you buy them your bond numbers are given to you a range (eg: 111AA111111- 111AA111210).
As this is the data they provide, I've set my spreadsheet up with purchase date in column A, first number of the range in column B, and last number of the range in column C.
Sample image of the sheet with example bond ranges and purchase date:
Now on a separate sheet I've listed the wins, with win date in A, winning bond number in B, and prize amount in C. In D or E I would like to somehow get it to then give me from the first sheet the date of purchase that winning bond was from.
Sample image of the sheet with winning bond numbers and month they won:
I've done a lot of googling and found similar threads to do this, but none of them have been quite what I want and I've not yet been able to work out how to tweak them into doing it. These have used index and sumproduct, but I'm yet to get it to work.
Any help in the right direction is greatly appreciated. If this doesn't make sense let me know and I'll try and explain it better.
So, like this:
INDEX($B$3:$B$5,MATCH(C9,$C$3:$C$5,1))
Not added a constraint to limit to the upper value, but you could.
This answer is pretty much the same than #SolarMike's answer but based on a diferent point of view.
If the pattern is always like 111AA111111 where 1 is a numeric value and AA is a text value and unique then you can extract the text part from each id using function MID and search for it with INDEX and MATCH:
Formula is:
=INDEX($A$1:$A$3;MATCH("*"&MID(B9;4;2)&"*";$B$1:$B$3;0))
But for this to work each AA must be unique.

Excel - Mind numbing issue- Form based league standing

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.

Grab next same value in Excel/Google Sheets for RANK/MATCH formula

I have a list of players in Google Sheets that assigns them a rank based on wins, followed by some more match variables — standard stuff.
I then use the rank to order the players in a league table format.
However, when I have two more players with the same rank, I hit a problem. The easiest way to illustrate it is with a link to the spreadsheet. Left side is the data, right side is the outputted table:
https://docs.google.com/spreadsheets/d/1n05ETFfF01uCwp1Q88Z0Zi8XkH-dNm29Ocb6yVP84rU/edit?usp=sharing
My aim is:
To allow drawing players, and thus output:
1= Player 1
1= Player 2
3 Player 3
4 Player 4
But also to add players with a rank of 0 (already calculated) to the bottom of the list, in no particular order, but below those who have played.
May serve for ColumnM, but seems would require adjustments elsewhere:
=if(countif(I$2:I$8,I2)>1,IF((B2=0), 0, RANK(H2,$H$1:$H$531,0))&"=",IF((B2=0), 0, RANK(H2,$H$1:$H$531,0)))
You could reproduce your table (excluding the ranking) with this in N1:
=QUERY(A:G,"select * order by B desc, G desc",1)
and then in M2:
=ArrayFormula(IF(LEN(N2:N),(COUNTIF(S2:S,">"&S2:S)+1)&IF(COUNTIF(S2:S,S2:S)>1,"=",),))
Any kind of algorithm is going to hate ties. They will produce unpredictable results, logic errors.
So you might set up your ranking system to remove the ties. Possibly use the date they joined the league for tiebreaker, which would allow you to rank the players with no stats as well.
Make the rules known to all players. E.g. 3 points for a win, 1 point for a tie, 0 for a loss, tie goes to the player with highest total points scored. If still tied, it goes to player in the league longer. The likelihood of established players getting to the join-date tiebreaker should be as remote as you can make it, so your first tiebreaker should be one that produces a lot of diverse answers.
Also, I am not sure, but I think the reason your question got downvoted was because a) it's a bit vague, and b) in this day and age, you really don't want to be opening data files from unknown people. A snapshot of data from your spreadsheet might have been a better illustration than a link to it. I know I will not open your sheet...I don't know you.

1X2 formula using IF & AND nesting in Open Office Calc for football world cup?

It is FIFA world cup time and need some help with my spread sheet project.
We have betting of every game result. Every guy/grl in our betting pool gets points as followed:
1 point for guessing home score right
1 point for guessing away score right
1 point for guessinf winner (1X2) right.
Every guy/grl has his/her own tab in the spreadsheet in which their betting (scores) are inserted in rows like
1-0
1-1
2-4
3-2 ect...
There is one tab to which I enter the actual score as the games are played. These are the real score from which the "logic" checks that how player should be awarded with points.
After hours of inconclusive thinking my question is that how can I make formula that gives me one (1) point, if player guesses the winner corectly (home wins, away wins or the game is tie)?
I already have have system, where I get point for guessing score correctly (if u guess home goals = 1 point and away goals = 1 point, i use formula =IF(EXACT(D2;REALFOOTBALLSCORE.D4);1;0)), but I need one for telling me, that am I rewarded one point for guessing the winner (1X2) or not. I think that in case to do so, I need to play with IF AND nesting. So simplified: what formula tells me that did I guess the winner (1X2) correctly?
Result can also be TRUE or FALSE. The only important thing is, that I get an result of that will I get that one point for 1X2 or not. I use SUM to calculate all points together. It doesn't need to look cool. I hide all the numbers to bottom of the document, where nobody can see them.
Cheers!
I used this formula which also accounts for correctly forecasting a draw as a point:
=IF(OR(Results!F7="",Results!G7=""),"",IF(F7=Results!F7,1,0)+IF(G7=Results!G7,1,0)+IF(OR(AND(F7>G7,Results!F7>Results!G7),AND(F7<G7,Results!F7<Results!G7),AND(F7=G7,Results!F7=Results!G7)),1,0))
I actually built a version that you might find helpful as a starter:
http://we.tl/vHn90XwBTi
You'll need to figure out what you want to do for the knockout stages. If you're only focused on 90min results, just fill down for the remaining fixtures.
Enjoy the world cup!
Basil

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.

Resources