在Sheet2的C2单元格输入以下公式,然后向下填充公式
=LOOKUP(1,0/((Sheet1!B$2:B$20=A2)*(Sheet1!C$2:C$20=B2)),Sheet1!A$2:A$20)
在Sheet2的D2单元格输入以下公式,然后向下填充公式
=LOOKUP(1,0/((Sheet1!B$2:B$20=A2)*(Sheet1!C$2:C$20=B2)),Sheet1!D$2:D$20)
C2公式
=SUMIFS(Sheet1!A:A,Sheet1!B:B,A2,Sheet1!C:C,B2)
D2公式
=VLOOKUP(C2,Sheet1!A:D,4,0)
一并下拉