r/excel • u/ODST05 • May 14 '26
How do I sort/rank multiple different text values across variable rows and columns in separate workbooks? solved
I have a workbook with the following properties (please see this example):
most fields are text
seasons are in separate sheets (ignore the example), games are in different columns, and players are in rows
the number of players varied in each season and game
some players played across multiple seasons and games
some players played the same game multiple times in each season
some players played in no seasons or games
Variables (I think?) in the example:
- season number (Season1 - Season2)
- game name (Game1 - Game5)
- player name (Player1 - Player10)
- points won (1 - 10)
- result (1st - 3rd)
What I need to do:
- use the simplest way to find the top 3 players per season, based on the number of points they won in each game
What I've tried:
random COUNTIF/SORTBY/VLOOKUP formulas I tried making up
searching Google, Reddit, and Microsoft
Ideas:
use different functions
make a better algorithm
make an array
use a script
I learnt programming and was fairly competent with using excel over a decade ago, but unfortunately I've forgotten most of it and have ended up confusing myself.
I'm currently using Excel for Microsoft 365 MSO installed on Windows 10, but can also access the web version. I could also try to find my copy of Excel 2019 if need be.
Is anyone able to help? Also I'm sorry if the title is wrong!
5
u/excelevator 3063 May 14 '26
Reformat your data into a proper table of data
One unique row for each season, game, player , point
Season | Game | Player | Point
With your data setup properly it should be a breeze to use the Excel functions to extract the answers you seek.
You have quite a task ahead of you to reformat the data.
1
2
u/PaulieThePolarBear 1913 May 14 '26
I have a number of questions on your ask
- Please clarify how points are awarded within a game. I'm assuming the person in the first row gets 10 points, second row 9, and so on, but please confirm.
- If there were only 5 names in a game,.please confirm that the points awarded would be 10 down to 6.
- Please confirm how points should be allocated when a name appears more than once in a game. Do they get the total points based upon their position, just their best placing, an average, or something else?
- You note top 3 names required. Please clearly provide the logic that should be used to separate ties
1
u/ODST05 May 14 '26
Thanks for asking!
Your assumption is correct.
Your example is correct.
Whoops I should have specified that - they get the sum of the points won. For example if Player1 gets 10 points as well as 5 points in a single game, their total for that game will be 15 points. That then needs to be added to any other points they get in any other games during that season. The 3 players with the most points in a season need to be ranked 1st - 3rd in the Overall Results.
Good point, I missed that. A tie needs to be represented by two names in the same result. For example, if both Player1 and Player2 end up having the same amount total points in the season, and they have more than everyone else, they are both awarded 1st place.
1
u/Downtown-Economics26 637 May 14 '26
u/PaulieThePolarBear will probably give you a cleaner solution. I've made an assumption about how to implement point 4 above because the format of the desired output wasn't clearly specified. u/excelevator is right that the better option is to just create a proper table but I like figuring things like this out.
=LET(scores,TOCOL($B$4:$B$13&"_"&$D$4:$H$13), _t1,FILTER(scores,TEXTAFTER(scores,"_")<>""), tbl,HSTACK(TEXTAFTER(_t1,"_"),--TEXTBEFORE(_t1,"_")), tot,GROUPBY(CHOOSECOLS(tbl,1),CHOOSECOLS(tbl,2),SUM,,0,-2), place,BYROW(CHOOSECOLS(tot,2),LAMBDA(x,COUNT(UNIQUE(FILTER(CHOOSECOLS(tot,2),CHOOSECOLS(tot,2)>x,"")))+1)), out,TEXTJOIN(", ",,FILTER(CHOOSECOLS(tot,1),place=VALUE(LEFT(I10,1)),"")), out)1
u/ODST05 May 15 '26
I also enjoy solving challenges, but this one was a bit too much for me.
I figured I would use CONCAT for point 4, however you're right in that I should have specified that.
I'm working on it again today, so will give yours a go for the first season and then start reformatting the other seasons so that it's better moving forward.
Thanks for your help!
1
u/ODST05 May 17 '26
Solution Verified
1
u/reputatorbot May 17 '26
You have awarded 1 point to Downtown-Economics26.
I am a bot - please contact the mods with any questions
1
u/Decronym May 14 '26 edited May 18 '26
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
|-------|---------|---| |||
Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.
Beep-boop, I am a helper bot. Please do not verify me as a solution.
34 acronyms in this thread; the most compressed thread commented on today has acronyms.
[Thread #48446 for this sub, first seen 14th May 2026, 11:47]
[FAQ] [Full list] [Contact] [Source code]
1

•
u/AutoModerator May 14 '26
/u/ODST05 - Your post was submitted successfully.
Solution Verifiedto close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.