在数据集中查找多个匹配项,并且 return 所有匹配项都在一行中

Find multiple matches in a dataset, and return all matches in a single row

什么数组公式适用于此?

测试Sheet:Open

当前数据结构

|   A   |     B      |     C    |
| John  | StartDate1 | EndDate1 |
| Adam  | StartDate3 | EndDate3 |
| John  | StartDate2 | EndDate2 |
| Ted   | StartDate5 | EndDate5 |
| Adam  | StartDate4 | EndDate4 |

预期结果

|   E   |     F      |     G    |     H      |     I    |
| John  | StartDate1 | EndDate1 | StartDate2 | EndDate2 |
| Adam  | StartDate3 | EndDate3 | StartDate4 | EndDate4 |
| Ted   | StartDate4 | EndDate4 |            |          |

我试过的

=FILTER(B2:C,A2:A = E2)

=TRANSPOSE(FILTER(B2:C,A2:A = E2:E))

=ARRAYFORMULA(VLOOKUP(E2:E,A2:C,{2,3}))

我做错了什么?有没有更好的arrayformula可以连续显示与唯一名称匹配的每个开始和结束日期?

感谢您的帮助!

使用:

=INDEX(SPLIT(FLATTEN(QUERY(QUERY(IF(A3:A="",,{A3:A, "×"&B3:B&"×"&C3:C}), 
 "select max(Col2) where Col2 is not null group by Col2 pivot Col1"),,9^9)), "×"))