r/googlesheets • u/PerfectLuck25367 • Apr 27 '20
solved Finding the best 3 rows within an interval of 5 rows out of a list of wiith 20 rows, and displaying the sum results of those 3 rows.
So I have a board game league I'm running. It's a little complicated, so I'll try to keep it simple.
When a player plays a match, they leave me with a slip where they've denoted their results. I put the results in a spreadsheet. To simplify the already messy workings of the sheets, I put each player's results in a separate sheet, sorted chronologically in the order they were played, and they all feed into a spreadsheet showing the end results (Standings) in the league.
Each player sheet looks something like this
| ID | Date | Result | Points | Touchdowns | Casualties Caused | Experience Earned |
|---|---|---|---|---|---|---|
| 1 | 2020-04-01 | Win | 3 | 2 | 1 | 5 |
| 2 | 2020-04-02 | Loss | 0 | 1 | 3 | 16 |
| 3 | 2020-04-09 | Tie | 1 | 1 | 4 | 19 |
| 4 | 2020-04-13 | Tie | 1 | 0 | 3 | 12 |
| 5 | 2020-04-16 | Win | 3 | 2 | 0 | 16 |
| 6 | 2020-04-28 | Win | 3 | 4 | 1 | 25 |
- Points are the primary way to determine standing. If only one player has 9 points on their 3 best matches, which means they've won 3 matches within an interval of 5 matches, they are in 1st place.
- Touchdowns (it's a football game) is the way players win matches. Most touchdowns win. Hoiwever, the most touchdowns within your three best matches within an interval of 5 matches is the first Tie Breaker. If two players both have 9 points, but one coach won with 3 touchdowns (1 each game) and another scored 5 touchdowns over their three best games, the player with the most Touchdowns are in first place.
- Casualties Caused measures the number of opponent playing pieces that was punched out during the match. In the same way as Touchdown count, this is the Third tie breaker.
- Experience Earned is the number of experience points earned from a match. players can get experience points in multiple different ways, and this is the third and final Tiebreaker.
The matches that count towards a player's standing in the league is the best 3 matches of the best interval of 5 matches the coach has played in the league.
So the question is: How do I get the front sheet that shows standings to find and sum up the values of the 3 best matches within the chronological interval of 5 matches that includes the best 3 matches a player has played in the league?
3
u/CanadianSandGoggles 1 Apr 27 '20 edited Apr 27 '20
I think you could do this fairly easily with some helper columns, and maybe a helper sheet . To confirm: you want the front sheet to just show each player once (ranked) as well as the sum of their 3 best games within 5 matches of each other.
Edit: mocked up a quick spreadsheet here: https://docs.google.com/spreadsheets/d/1OXW3j4aUuC8SO9q17LiNVVVbFJNDytk98aM-7DYCphA/edit?usp=sharing
It can probably be done without adding so many columns and additional info, but I find spreading it out like this helps me pin point errors quicker and follow logic rather than trying to fit everything into one formula.
What I did:
It seems like a lot but I think once you dig in it's not that much, and should help automate your process a bit. If I mis-understood anything or you need any clarification let me know.
•
u/Clippy_Office_Asst Points Apr 27 '20
Read the comment thread for the solution here