简体   繁体   中英

I need to sum N highest players' score of each team

So I have a sheet like this

players:

球员

and I need to get the sum of 4 highest scores of each team like this:

4-sum

even when there are less than 4 players in a team (sum of 1, 2 or 3 best in these cases then) but without any scripts, I believe it's more than possible

try:

=ARRAYFORMULA({UNIQUE(SORT(FILTER(B2:B, B2:B<>""))), 
 MMULT(QUERY(SPLIT(TRANSPOSE(TRIM(QUERY(QUERY({9^9-C2:C&A2:A, B2:C}, 
 "select max(Col3) 
  where Col2 !='' 
  group by Col1 
  pivot Col2"),,999^99))), " "), 
 "select Col2,Col3,Col4,Col5")*1, {1;1;1;1})})

0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM