假设sheet2的第一行为标题
在sheet2的D2输入公式
=IF(ISERROR(VLOOKUP(A2,Sheet1!A:D,4,)),B2,VLOOKUP(A2,Sheet1!A:D,4,)+B2)
或者=IF(ISERROR(VLOOKUP(A2,Sheet1!A:D,4,)),0,VLOOKUP(A2,Sheet1!A:D,4,))+B2
sheet2中b1输入
=IF(ISERROR(VLOOKUP(A1,Sheet1!A:D,4,0)),"",VLOOKUP(A1,Sheet1!A:D,4,0))
下拉