I have a spreadsheet that tracks what we buy, when we buy it, when it comes in and how much it cost.

If we order a part and we get a partial quantity we record only the partial receipt. I need a macro that looks at the total quantity ordered, then looks for any receipts on that same PO and totals all of the quantities received.

If everything has been received then I want a new column to show "1". if there is still an outstanding balance I would like a "2". I have attached a mock up of what some of my data looks like and what I am trying to accomplish.


Thanks in advance. Purchase Order Sample.xlsx