Forum Discussion
Create a ranking
- Jan 07, 2024
You may still be reeling so I have had a first cut at incorporating your data
Dragging the corner of the matches table down should incorporated additional matches as would adding further data. The stats columns could be added as required.
In this case, if the goal is to create a dynamic ladder where the challenger leapfrogs over the defeated opponent and all players in between, you can implement a more complex solution using Excel formulas.
Assuming your ladder starts in column A, and the challenger, opponent, and outcome information are in columns B, C, and D respectively, follow these steps:
Step 1: Identify the Matched Rows
- Column E: Matched Rows:
- Use the following formula in cell E2 and drag it down for all rows:
=IF(OR(B2="", C2="", D2=""), "", IF(D2="Win", MATCH(C2, $A$2:$A$100, 0), MATCH(B2, $A$2:$A$100, 0)))
- This formula will find the match positions for wins and losses. If no match is found, it leaves the cell blank.
Step 2: Determine the New Positions
- Column F: New Positions:
- Use the following formula in cell F2 and drag it down:
=IF(E2="", "", IF(D2="Win", ROW(B2) + E2 - ROW(C2), ROW(C2) + E2 - ROW(B2)))
- This formula calculates the new position for the winner (if the outcome is a win) based on the challenger and opponent positions.
Step 3: Implement the Dynamic Ranking
- Column G: Dynamic Ranking:
- Use the RANK function to create a dynamic ranking based on the new positions:
=IF(F2="", "", RANK(F2, F:F, 0))
- This formula assigns a rank to each player based on the new positions.
Step 4: Display the Ranked Ladder
- Display the Ranked Ladder:
- Use the INDEX and MATCH functions to display the ranked ladder. Assuming your original ladder is in column A, use the following formula in a new column (e.g., H2):
=IFERROR(INDEX($A$2:$A$100, MATCH(ROW(), $G$2:$G$100, 0)), "")
- Drag this formula down for all rows.
Now, as matches are played and outcomes are entered, the ranking will automatically update based on the challenger leapfrogging over the defeated opponent and all players in between.
This solution assumes that you have a maximum of 100 players in your ladder (adjust the range in formulas as needed). If you have a larger or smaller number of players, adjust the range accordingly.
This is exactly what I needed - it's not there yet though.
The first step (1) worked a treat, enabling the new position to be determined.
Step 2 has produced the same list as step 1, so I'm unsure if that's me making a mistake or not.
Step 3 is working as a ranking, but ranks based on the players results (If someone hasn't played though, they are not included).
I think that the only change to rank comes when a challenger wins a game. A lost challenge changes nothing, so the ranking isn't based on a list of results, but a single result being applied back into the original ranked list of players.
[When I did use the final step, it didn't show the right order, and has a couple of gaps, so I've not been able to implement that.
I don't know how to attach a file here, so have moved it to an online version for easier understanding if that's OK? https://docs.google.com/spreadsheets/d/12wAQ_kJB9vCRwT8r7UdOf0QCzCbHzPiroJ6AUHzjcSQ/edit#gid=1284103795
- NikolinoDEJan 06, 2024Gold Contributor
The formulas should actually work in Excel. As for Google Sheets, which was not clearly defined from the start, my knowledge is limited as to which Excel function works on Google Sheets. The link to the file requires data for access, which I do not allow.
Here is a breakdown of the formulas and their expected outcomes:
Step 1: Identify the Matched Rows
- Column E: Matched Rows
- Formula: =IF(OR(B2="", C2="", D2=""), "", IF(D2="Win", MATCH(C2, $A$2:$A$100, 0), MATCH(B2, $A$2:$A$100, 0)))
- Purpose: This formula determines the row number of the opponent or challenger based on the match outcome. If there's no match, it leaves the cell blank.
- Expected outcome: For a win, the formula should return the row number of the opponent. For a loss, it should return the row number of the challenger. If no match is found, it should return an empty cell.
Step 2: Determine the New Positions
- Column F: New Positions
- Formula: =IF(E2="", "", IF(D2="Win", ROW(B2) + E2 - ROW(C2), ROW(C2) + E2 - ROW(B2)))
- Purpose: This formula calculates the new position for the winner based on their original position, the opponent's position, and the match outcome.
- Expected outcome: For a win, the formula should return the new position for the winner, which is their original position plus the difference in their positions with the opponent.
Step 3: Implement the Dynamic Ranking
- Column G: Dynamic Ranking
- Formula: =IF(F2="", "", RANK(F2, F:F, 0))
- Purpose: This formula applies the RANK function to create a dynamic ranking based on the new positions determined in Step 2.
- Expected outcome: The ranking should reflect the updated positions based on the matches played.
Step 4: Display the Ranked Ladder
- Column H: Ranked Ladder
- Formula: =IFERROR(INDEX($A$2:$A$100, MATCH(ROW(), $G$2:$G$100, 0)), "")
- Purpose: This formula utilizes the INDEX and MATCH functions to display the ranked ladder based on the dynamic ranking in Column G.
- Expected outcome: The ranked ladder should show the players in their updated positions based on the matches played.
- JWestyJan 06, 2024Copper ContributorThank you for the extra detail - I will re-run in Excel. (Just using Google sheets to share with you for greater context)
- JWestyJan 06, 2024Copper ContributorHi NikolinoDE,
Luckily the formulae work in both set ups.
Going back to my earlier points, Step 3 is working as a ranking, but ranks based on the players results. As this is a ladder, some will not play within a given period, and others will play multiple times, so not all players will be included, and so the table cannot be a ranking of the resulting (there is a starting hierarchy).
Ranking changes when a challenger wins a game. A lost challenge changes nothing, so the ranking isn't based on a list of results, but a single result being applied back into the original ranked list of players.
[When I did use the final step, it didn't show the right order, and has a couple of gaps, so I've not been able to implement that].