=IF(AND(C5=762,E5>0),VLOOKUP(D5,Sheet2!$A$1:$E$6745,5,FALSE)*E5,"") is what I have so far. I need the formula to look up my code 762, and if the criteria is met, give me one flat rate ($94.35) regardless of how many times this code/units have been entered.