给定月份和年份的Google表格中的按天总计

时间:2020-08-04 09:14:04

标签: google-sheets sum google-sheets-formula google-sheets-query google-query-language

我有下表:

我想做的是写一个公式,该公式按B1和C1中给出的月份和年份中每个唯一的天总计,因此输出应为:

enter image description here

我不确定如何开始使用,谷歌搜索似乎建议使用SUMIF。

Sheet is here

1 个答案:

答案 0 :(得分:2)

尝试:

=QUERY(FILTER({A5:B, TIMEVALUE(C5:C)}, MONTH(A5:A)=MONTH(B1&1), YEAR(A5:A)=D1), 
 "select Col1,sum(Col3) 
  where Col1 is not null 
  group by Col1 
  label sum(Col3)'' 
  format sum(Col3)'[hh]:mm'", 0)

enter image description here

相关问题