0
This question is for an Inventory tracking system I am making in Google Sheets.
Just to be clear:
- Any incoming Items have a positive quantity
- Any outgoing Items have a negative quantity
The requirement is, when the closing stock is counted, the On-Hand quantity is put, which is a positive number. This positive number is what is currently available in stock.
Inversely, if the closing stock is put as a negative number, it means it is the amount consumed (negative number). Here, it will be subtracted from total previous stock. The challenge is therefore to calculate this:
Stock for Item X = [Difference between its total qty & the closing (on-hand) qty] - [previous stock]
I Used SUMIFS to get the stock for each item. This doesn't take into account the date, as we need the current stock to be calculated, regardless of days.
Problem: This works only till I add new incoming stock, after which the whole calculation goes for a toss. For example, if I add 10,000 on the 3rd day, the Inventory comes to -4300, when it should have been 15,700 See images for better understanding.
Before: No new stock added on day 3 --> The sumifs seems fine.
After: 10,000 qty added on day 3 --> breaks the sumifs.
Let me know if you need any other information to understand.
Would appreciate any help.. Spent too much time already on this. Thanks.
P.S. - I hope I am posting on the right stack. Should I post this on webapps too?
It's a good idea to read the Wiki for the tags you select. BUT, don't cross-post. We're voting to get this question moved over to WebApps and once enough votes come in, it'll be moved automatically. – music2myear – 2019-01-29T16:30:42.607