Search code examples
google-sheetsgoogle-sheets-formulaformula

How to get 5 biggest values from multiple sheets in Google Sheets?


I need to take five better values from the sheets "Lap1" and "Lap2" and put them in the Sheet "Biggest" for every team and sort them from the biggest to the smallest.

I tried the query formula but couldn't write it correctly.

Expected values:

Team 1: 12 4 3 2 2

Team 2: 12 8 7 5 4

https://docs.google.com/spreadsheets/d/1HMMTVWTSAI4jIIY6MGBx4tARswFnLGwOtP6B8rLA_-8/edit#gid=936304041


Solution

  • You may try this in your Biggest tab:

    =map(D4:D,lambda(Σ,if(Σ="",,let(Λ,{{'Lap1'!G:R,'Lap1'!D:D};{'Lap2'!F:Q,'Lap2'!D:D}},
         torow(sortn(tocol(ifna(filter(choosecols(Λ,sequence(12)),choosecols(Λ,13)=Σ)),1),5,,1,))))))
    

    enter image description here