早上好,
我需要一個公式,它根據 L 列中的“Eindscore”計算前 3 名,但僅來自 F 中的“類別”。
所以我認為 Query、Sort 和 If 的組合會起作用,但我對任何想法持開放態度。
類別一直在變化;雖然現在 F27 是彩色的,但它可能是別的東西,所以也應該考慮到這一點。
示例作業表:
您可以使用資料并使用資料透視表顯示前 3 個。
=QUERY(A$2:D,"select D, max(A) where A is not null and D <= 3 group by D pivot B")


uj5u.com熱心網友回復:
是的,查詢應該這樣做
=query($A1:$C11,"select A where B='"&B15&"' order by C desc limit 3 label A ''",1)
在 B16 中并復制到 E16 和 H16。

編輯
因此,從 @WS 大量借用,您可以做一個通用公式,例如:
ArrayFormula(query({A2:C,countifs(B2:B,B2:B,C2:C,">="&C2:C)},"select max(Col1) where Col4<=3 and Col1 is not null group by Col4 pivot Col2"))

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/493928.html
