Oct 17 2024 02:56 AM
Hi,
I have a two-column table with "Name" and "Points". To sort this table, I use the SORTBY function and that works as I would like it to do. However, if two or more persons have the same number of points I would like to sort the person with the highest ranking before next one. The ranking information is in another (two column) table. I'm struggling to find a solution to do this (without VBA). If anyone has an idea how I can solve this or point me in a direction it will be much appreciated.
Oct 17 2024 03:35 AM
Hi @espensun
Seems to do it... (used Tables - not mandatory):
=LET(
ranks, XLOOKUP( Points[Name], Ranks[Name], Ranks[Rank] ),
stacked, HSTACK( Points, ranks ),
sorted, SORTBY( stacked, Points[Points], -1, ranks, -1 ),
DROP( sorted,, -1)
)
Oct 17 2024 03:43 AM
Thank you so much for your reply @Lorenzo. I'll give that a go👍