Google 工作表公式,用于查找在特定地点和轮班工作时间最长的员工(INDEX/MODE 具有多个条件)

Google Sheets Formula that finds employee with most hours worked for a specific location and shift (INDEX/MODE with multiple Criteria)

在 Google 工作表中,我需要根据考勤卡数据(Table 在 col G:J).在随附的 google sheet 中,我需要 C 列中的公式,其中 return 是使用 A 列和 B 列作为条件的匹配员工的姓名,然后 D 列和 E 列应自动计算。

https://docs.google.com/spreadsheets/d/1HE90e1hVvsEIiFbNdb3sQ042LHMZhxyCno72eZMA79k/edit?usp=sharing

我之前使用的是 INDEX/IF/MODE/MATCH 的 ArrayFormula(单元格 C15 中的示例),但它只能 return 班次最多的员工,无法按标准进行区分。

提前致谢!

删除 C2:D7 中的所有内容并在 C2 中使用:

=INDEX(IFNA(VLOOKUP(A2:A6&B2:B6, SORT(QUERY({H2:H&J2:J, G2:G, I2:I}, 
 "select Col1,Col2,count(Col1),sum(Col3) group by Col1,Col2"), 3, 0), {2, 4}, 0)))