见截图
E2输入
=SUMPRODUCT(COUNTIF(A2:A10,B2:B10)*C2:C10)
=SUMPRODUCT(ISNUMBER(MATCH(C2:C20,B2:B20,0))*D2:D20)
=SUMIFS(C:C, A:A, D1, B:B, E1)