Hi,
Trying to do a project with keeping accurate real cost after sale of item , I was able to do when only item is purchased but stuck as soon as item get sold.
Formula trying to modify and use is
=IF(OR(D2=$A$3:$A$5),SUMPRODUCT($F$2:F2*ABS($H$2:H2)*($E$2:E2=E2))*(ISNUMBER(MATCH($D2:D$3,$A$3:$A$6,0))),"")-(LOOKUP(2,IFERROR(1/($E$3:E3=E3),(ISNUMBER($I$3:I3/$G$3:G3)))*($E$3:E3=E3)*(ISNUMBER(MATCH($D$3:D3,$A$6:$A$7,0)))))
first half of the formula is calculating but then adding 2nd half does not work. When using 1st half formula can see it working till row 18
Problem start from Row18 when sale take place have highlight with the answer looking for. Also trying @ mrExcel will add ref once i post
Thanks
Trying to do a project with keeping accurate real cost after sale of item , I was able to do when only item is purchased but stuck as soon as item get sold.
Formula trying to modify and use is
=IF(OR(D2=$A$3:$A$5),SUMPRODUCT($F$2:F2*ABS($H$2:H2)*($E$2:E2=E2))*(ISNUMBER(MATCH($D2:D$3,$A$3:$A$6,0))),"")-(LOOKUP(2,IFERROR(1/($E$3:E3=E3),(ISNUMBER($I$3:I3/$G$3:G3)))*($E$3:E3=E3)*(ISNUMBER(MATCH($D$3:D3,$A$6:$A$7,0)))))
first half of the formula is calculating but then adding 2nd half does not work. When using 1st half formula can see it working till row 18
Problem start from Row18 when sale take place have highlight with the answer looking for. Also trying @ mrExcel will add ref once i post
Thanks
Attachments
Last edited: