看我的抓图:
D2输入
=IF(COUNTIF(B$2:B2,B2)=1,SUMIFS(C:C,B:B,B2,A:A,">=2019-4-11",A:A,"<=2019-4-19"),"")
或
=IF(COUNTIF(B$2:B2,B2)=1,SUMPRODUCT((B$2:B$100=B2)*(A$2:A$100>=--"2019-4-11")*(A$2:A$100<=--"2019-4-19")*C$2:C$100),"")
或
=IF(COUNTIF(B$2:B2,B2)=1,SUMPRODUCT((B$2:B$100=B2)*(A$2:A$100>=DATE(2019,4,11))*(A$2:A$100<=DATE(2019,4,19))*(C$2:C$100)),"")
回车并向下填充。