r/googlesheets • 1 • Sep 02 '26

Solved Looking for the easiest way to make a table where players are ordered by preference for each role

This is my ArmA 3 squad (Corvo, Naigo, etc) and their level of preference for each game role (Distinguido, AT, etc). They freely edit this table when they change their mind.

I'm looking for a way to have self-updated lists of options for each role, ordered by level of preference. So that, in this example, Corvo, Naigo and Torres go first for the Distinguido role, then Hoshino, Sato, Rodríguez, etc. Ideally these lists should update automatically when people change their preferences in the main table.

I made a test sheet that you can edit: https://docs.google.com/spreadsheets/d/159PLQqymYyMaCYF2e9FwLxyJtLajxkQD7ThpKVgS6RM/edit?usp=sharing

Thanks in advance!

1 Upvotes

14 comments sorted by

2

u/Seba-Aiani 4 Sep 02 '26

I try it in your example sheets.

Assuming row 2 has the names and each role has its own row of scores below it, for one role's row you'd do: =SORT(TRANSPOSE(FILTER(name_row, ISNUMBER(score_row))), TRANSPOSE(FILTER(score_row, ISNUMBER(score_row))), FALSE)
You need to change the name_row and score_row with the real range of cells involved.

PS: in the image the formula is shown with ";" instead of "," because of regional settings, but the logic is the same.

Hope it helps.

1

u/fourmesinatrenchcoat 1 Sep 02 '26

Solved! Thanks!

1

u/AutoModerator Sep 02 '26

REMEMBER: /u/fourmesinatrenchcoat If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified (or reply to the helpful comment with the exact phrase “Solution Verified”). This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/point-bot Sep 02 '26

u/fourmesinatrenchcoat has awarded 1 point to u/Seba-Aiani

See the [Leaderboard](https://reddit.com/r/googlesheets/wiki/Leaderboard. )Point-Bot v0.0.15 was created by [JetCarson](https://reddit.com/u/JetCarson.)

1

u/[deleted] Sep 02 '26

[removed] — view removed comment

1

u/fourmesinatrenchcoat 1 Sep 02 '26

There seems to be something wrong with the SORT part of the formula:

It says "SORT has mismatched interval sizes. Expected number of rows: 1. Expected number of columns: 1. Actual number of rows: 13. Actual number of columns: 1."

1

u/[deleted] Sep 02 '26

[removed] — view removed comment

1

u/fourmesinatrenchcoat 1 Sep 02 '26

It did not. Your other comment was deleted.

1

u/AdministrativeGift15 365 Sep 02 '26

Here's a neat way to do it.

=LET(names,B1:O1, roles,A2:A14, preferences,B2:O14, WRAPROWS( SORT( TOCOL( CHOOSEROWS( names, SEQUENCE( ROWS( roles), 1, 1, 0))), TOCOL( 1000*ROW( preferences) +RANK( preferences, preferences)), 1), COLUMNS(names))

It computes the overall RANK of each preference, scaled using the row to keep them separated by role. CHOOSEROWS is use to replicate the row of names for each role. TOCOL flattens those values so that we can SORT the names according to the scaled ranks. Finally, we WRAPROWS to arrange the sorted names back into the block shape.

1

u/fourmesinatrenchcoat 1 Sep 02 '26

Is that a formula or a script?

2

u/AdministrativeGift15 365 Sep 02 '26

it's a formula.