Automatic quantity addition and subtraction based on values entered in a different Excel sheet.
Hey everyone,
So here is the dream. I am creating an inventory sheet that is accompanied by a receiving sheet and a sales sheet. On inventory sheet I have given a sequential unique number to each item as an identifier and in the receiving and sales sheet I have added data validation drop down to select items from the inventory sheet to be sold and received and I have Vlookups set up to automatically fill out certain columns on the receiving sheet and sales sheet based on the values in the inventory sheet.
I would like to have it so that when a quantity is added to the corresponding quantity column in the sales or receiving sheet it will automatically add or subtract the quantity related to the corresponding ID number on the inventory sheet.
I am wondering if maybe there is a formula, I can put in the quantity column on the inventory sheet so that this is possible.
Below are screenshots for reference:
To automatically update the quantity in your inventory sheet when you add or subtract from the sales or receiving sheets, you can use Excel's built-in functions like SUMIFS or INDEX/MATCH.
I cot not see clearly your pictures thats why this example.
Here's a general guideline on how to set it up:
Assuming you have three sheets:
- Inventory Sheet: Where you maintain your inventory with unique IDs, descriptions, and quantities.
- Receiving Sheet: Where you record items received.
- Sales Sheet: Where you record items sold.
In the Inventory Sheet:
- Let's say your unique item IDs are in column A, descriptions in column B, and initial quantities in column C (e.g., C2 for the first item).
- In column D (e.g., D2), use a formula to calculate the updated quantity based on items received and sold. This formula adds the quantities from the Receiving Sheet and subtracts the quantities from the Sales Sheet:
=C2 + SUMIFS('Receiving Sheet'!QuantityColumn, 'Receiving Sheet'!ItemIDColumn, A2) - SUMIFS('Sales Sheet'!QuantityColumn, 'Sales Sheet'!ItemIDColumn, A2)
Or…
=LET(
ItemID, A2,
InitialQty, C2,
ReceivedQty, SUMIFS('Receiving Sheet'!QuantityColumn, 'Receiving Sheet'!ItemIDColumn, ItemID),
SoldQty, SUMIFS('Sales Sheet'!QuantityColumn, 'Sales Sheet'!ItemIDColumn, ItemID),
NewQty, InitialQty + ReceivedQty - SoldQty,
NewQty
)
- Drag this formula down for all items in your inventory.
In the Receiving and Sales Sheets:
- When you add an entry in the Receiving or Sales Sheet, ensure that the unique item ID is selected from the dropdown.
- Then, add the quantity in the relevant column (e.g., QuantityColumn).
- The inventory sheet will automatically update its quantity for that item based on the formula.
This setup will allow you to track inventory changes as you receive or sell items. It's important to ensure that your item IDs match between sheets, and this method provides you with real-time tracking of inventory.
Keep in mind that Excel's calculations work in real-time, so any change in the Receiving or Sales Sheet will immediately update the Inventory Sheet. The text, steps and Code was created with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.