I' having a table with names and countries as columns/rows:
Goal: Sort each individual row by the N highest (or lowest) values and afterwards replace replace the values with the corresponding header names, eg:
I found a transpose version which kind of does the job but I actually don't want to transpose :-)
=query(sort(TRANSPOSE(A22:H22),transpose(A23:H23),FALSE),"limit 4")