答案 0 :(得分:2)
假设A2
向下的日期/时间和B2
向下的值,请在C2
=AVERAGEIFS(B:B,A:A,">="&FLOOR(A2,"1:00"),A:A,"<"&CEILING(A2,"1:00"))
FLOOR
功能将向下舍入到小时,CEILING
将向上舍入,因此平均值介于01:00
和02:00
等之间。
以上版本将为您提供每一行(带重复)的平均值。如果你这样改变它,那么平均值只会出现在每小时的最后一个值
=IF(FLOOR(A2,"1:00")<>FLOOR(A3,"1:00"),AVERAGEIFS(B:B,A:A,">="&FLOOR(A2,"1:00"),A:A,"<"&CEILING(A2,"1:00")),"")
答案 1 :(得分:0)