Google 工作表:根据列中的重复值对行中的值进行分组

Google Sheets: Group Values in rows based on duplicate value in column

我正在尝试按列对 Google 表格数据进行排序。

原始数据

期望输出

我知道这可以通过一段时间的 QUERY 功能来提供,但我无法让它完全按照我想要的方式工作。我已经在 Excel 上通读了 this thread on Google Sheets and this thread

我认为 query 不能做到这一点:它可以通过几种方式聚合数据,但不能像 "take the values and arrange in a row" 那样聚合数据。为此,我会使用 uniquefilter。假设输入列为 A、B,输出列为 C、D...,公式为

C2:=unique(A2:A)至return队号无重复
D2:=transpose(filter(B2:B, A2:A=C2))到return的匹配分数,转置成一行。

D2 中的公式需要 copied/dragged 在 D 列的下方。