Search code examples
google-sheetsgoogle-sheets-formulaspreadsheetgoogle-query-languagetextjoin

How to use query to generate the result with descending order


Hi I would like to generate the result with descending order.

is it possible to use Query achieve this result? or is there alternative way ?

Thank you

https://docs.google.com/spreadsheets/d/1hnFi-5IRIb-hSO2YffvjR9ZETL11c8wVuCbBhC5m7qY/edit?usp=sharing

enter image description here


Solution

  • use:

    =INDEX(QUERY(SPLIT(FLATTEN(A2:A&"×"&B1:D1&"×"&B2:D), "×"), 
     "where Col3 is not null order by Col3 desc", ))
    

    enter image description here