D5公式:
=IF(OR(B5=Sheet1!C$5:C$100),VLOOKUP(B5&"定金",IF({1,0},Sheet1!C$5:C$100&Sheet1!D$5:D$100,Sheet1!E$5:E$100),2,0),"")
数组公式,按CTRL+SHIFT+回车,下拉;
G5公式:
=IF(OR(B5=Sheet1!C$5:C$100),VLOOKUP(B5&"定金",IF({1,0},Sheet1!C$5:C$100&Sheet1!D$5:D$100,Sheet1!A$5:A$100),2,0),"")
数组公式,按CTRL+SHIFT+回车,下拉。