B2=SUMIF(Sheet1!B:B,A2,Sheet1!C:C)
楼上的回答了,再写个B2=SUMPRODUCT((Sheet1!$B$2:$B$1000=A2)*(Sheet1!$C$2:$C$1000))向下填充公式
楼上是正解