I have attached the file I am using. I have a seperate data tab that I set the formula up to look off of. The issue I am running into now is that we must use left over M-A2012 inventory prior to being able to use S-F2013 inventory. The function I am using is... IF(AND(M58="C",F58="E1"),VLOOKUP(C58&$P$2,'Input Data_sept'!$A:$D,4,0),0) This only applies to S-F2013 Print Components.

My thought is to add the old inventory and cost per M into the data file, but I run into an issue where, if there is only 4900 in old inventory but we need a total of 21226, how do I set up a function that will take the old inventory plus the new inventory at the different costs? Any input would be great, for now, I'm focusing only on E1 P1 to E1 P4 just to get the function working.

Please let me know if you need any other details or clarifications, I have attached a sample. Sample1.xlsx

Any help is greatly appreciated, thanks in advance!