试试
=query({ArrayFormula(if(row(C9:C) <= max(if(not(isblank(D9:D)),row(C9:C))),vlookup(row(C9:C),filter({row(C9:C),C9:C},len(C9:C)),2),)), D9:H}, "Select Col1, count(Col2) where Col2 = 'Pending calls - EN' and Col1 = 'Kim' group by Col1 label count(Col2)''", 0)
或
=sumproduct(ArrayFormula(if(row(C9:C) <= max(if(not(isblank(D9:D)),row(C9:C))),vlookup(row(C9:C),filter({row(C9:C),C9:C},len(C9:C)),2),))="Kim", D9:D="Pending calls - EN")
看看这是否有效?
另请参阅您共享的电子表格,单元格 A1 和 A2。
要获得每个“mod”的计数,您可以尝试
=query({ArrayFormula(if(row(C9:C) <= max(if(not(isblank(D9:D)),row(C9:C))),vlookup(row(C9:C),filter({row(C9:C),C9:C},len(C9:C)),2),)), D9:H}, "Select Col1, count(Col2) where Col2 = 'Pending calls - EN' group by Col1 label count(Col2)''", 0)