I want to create a Google Spreadsheet which will work as a ranking system for a game.
- One sheet, "Ranking", should display the current ranking of the players, based on their points.
- Another sheet, "Matches", could be used to add matches.
Each match has one winner and one loser, where the winner should earn 10% of the loser's points (the loser does not lose any points).
The points in the "Ranking" sheet should be updated as new matches are added (but points should obviously only be added once per match).
View a simple example spreadsheet here:
https://docs.google.com/spreadsheet/ccc?key=0AqNThcZwHAYldEMzYUJmTU1TUW5WaVNSUlJhY1BGT0E&usp=sharing
Any tips on how this could be achieved?
Best Answer
This calls for a Google Apps Script, but not a very complicated one.
First, you need to decide a starting point for each player. Let's say each player starts on 100 points.
The following
updateRankings
function iterates through all matches, and calculates match points for each match. Player ranking points are updated after each match.You need to decide when the script should run (how often the ranking should be updated). Take a look at my example spreadsheet, where I have created a button that runs the script when clicked.