Function Problems

Create an Excel Inventory Tracker for In and Out Quantities

Jason MillerJason Miller Nov 18, 2026 873 views

Question details

Create an inventory tracker that calculates current stock from opening quantities and recorded movements.

Create an Excel Inventory Tracker for In and Out Quantities
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to log item codes, transaction dates, and incoming or outgoing quantities.
Observed behavior
Each stock movement is recorded separately, and the current quantity is calculated automatically for each item.
Before you start

List each product's unique item code and opening quantity. Decide which date the opening quantities represent so earlier movements are not counted twice.

Solution 1Recommended

Build an inventory and activity table with SUMIFS

Use separate tables for opening stock and transactions to calculate each item's current quantity.

1
Create the inventory table

On an Inventory sheet, enter the headers Code, InitialQuantity, and CurrentQuantity. Add one row per product, select the range, and choose Insert > Table. On the Table Design tab, name the table Inventory.

2
Create the activity table

On an Activity sheet, enter the headers Code, Date, and In/Out. Select the range, choose Insert > Table, and name the table Activity on the Table Design tab.

3
Log each movement

Add one row to the Activity table for each transaction. Enter a positive In/Out quantity for stock received and a negative quantity for stock issued, along with the item code and date.

4
Calculate current stock

In the first data cell under Inventory[CurrentQuantity], enter =[@InitialQuantity]+SUMIFS(Activity[In/Out],Activity[Code],[@Code]). Excel will normally fill the formula down the table.

5
Add an item-code dropdown

Select Inventory[Code], then use Formulas > Define Name to name the range ItemCodes. Select the Activity code cells and choose Data > Data Validation > List; enter =ItemCodes as the source.

Build an inventory and activity table with SUMIFS
Avoid counting opening stock twice: Enter only movements that occurred after the opening quantities were established. The formula includes every matching activity row, regardless of its date.
Track stock in WPS Spreadsheets

Create the same inventory tracker in WPS Spreadsheets

Use a product list, a transaction log, and a SUMIF formula in WPS Spreadsheets to calculate stock from signed movements.

  1. 1. Create the product list: In WPS Spreadsheets, create an Inventory sheet with Code in column A, InitialQuantity in column B, and CurrentQuantity in column C. Enter one product per row.
  2. 2. Create the activity log: Add a sheet named Activity with Code in column A, Date in column B, and In/Out in column C. Enter each incoming quantity as positive and each outgoing quantity as negative.
  3. 3. Calculate stock: On the Inventory sheet, enter =B2+SUMIF(Activity!$A$2:$A$10000,A2,Activity!$C$2:$C$10000) in C2. Copy the formula down for the other products.
  4. 4. Save the tracker: Choose File > Save As and save the workbook in XLSX format. Extend the formula's activity ranges if your log grows beyond row 10000.
Track incoming and outgoing stock in one activity logCalculate current quantities with SUMIFOpen and save Microsoft Excel XLSX workbooksUse a familiar spreadsheet interface for everyday inventory work
microsoft office alternative - wps office

Frequently Asked Questions

How do I record stock going out?

Add a row to the Activity table with the item code and date, then enter the outgoing quantity as a negative number in In/Out, such as -5.

Why is an item's current stock incorrect?

Check that the Activity code matches the Inventory code, outgoing quantities are negative, and the opening quantity does not already include the logged movements.

Does the SUMIFS formula calculate stock as of a specific date?

No. The formula shown includes all matching activity rows. To calculate stock as of a date, add a date condition to SUMIFS and use an opening quantity established before the included movements.

Can I prevent users from entering an invalid item code?

Yes. Define the Inventory code range as ItemCodes, then select the Activity code cells and use Data > Data Validation > List with =ItemCodes as the source.