=SUMPRODUCT((A1:A30=1)*(B1:B30>=TIME(9,,))*(B1:B30<=TIME(12,,))*C1:C30)如果是2003以上版本,还可用如下公式=SUMIFS(C:C,A:A,1,B:B,">="&TIME(9,,),B:B,"<="&TIME(12,,))
=sumproduct((A1:A30=1)*(B1:B30>=9/24)*(B1:B30<=12/24)*C1:C30)