Forum Discussion
Reducing a cell value using vlookup
Trust me. We want to preserve our beginning balances. From those we want to subtract issues to obtain our ending balances. We do not want to overwrite beginning balances because that will destroy any chance of fixing errors. Besides, Excel's formulas cannot overwrite literals (hard coded values). VBA can, but not formulas.
I also urge everyone to use tables because they are dynamic named ranges that will automatically extend formulas as we add orders or stock items and make formulas self documenting. Below is a picture of how I would do it and attached is the spreadsheet with tables and formulas.
BTW - I'm using SUMIFS instead of VLOOKUP because it is very likely that we could have multiple orders for the same SKU. VLOOKUP will only find one entry. Not all.
ulas.