Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9845

Transform table: Get N top results for each row and replace with header value

$
0
0

I' having a table with names and countries as columns/rows:

enter image description here

Goal: Sort each individual row by the N highest (or lowest) values and afterwards replace replace the values with the corresponding header names, eg:enter image description here

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")

Viewing all articles
Browse latest Browse all 9845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>