Hello,
if the first appearance of a Part number has the starting balance in column D, then you can use an Index/Match (or use Vlookup, if you prefer), to find that first occurrence and get the starting balance. Then use a Sumif to work out how many items were ordered for that part number and subtract that from the starting balance.
=INDEX(D:D,MATCH(F3,B:B,0))-SUMIF(B:B,F3,C:C)
It would be a lot cleaner if the starting balance was explicitly stated somewhere in the sheet, instead of inferring it from a formula, though.
cheers, teylyn
Bookmarks