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

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 9713

Latest Images

Trending Articles



Latest Images