Prompt
How do I track inventory in a spreadsheet-style database?
Latest observation
A good way to track inventory in a spreadsheet-style database is to set it up like a simple relational system, even if it looks like a spreadsheet. The key is to separate product info from movement/transactions.
1) Use one table for products
This is your master list.
Products table
- Product ID
- Product Name
- SKU
- Category
- Supplier
- Unit Cost
- Reorder Level
- Current Stock
Example:
| Product ID | Product Name | SKU | Category | Unit Cost | Reorder Level | Current Stock |
|---|---|---|---|---|---|---|
| P001 | T-shirt | TS-01 | Apparel | 8.00 | 20 | 42 |
| P002 | Mug | MG-10 | Gifts | 3.50 | 15 | 9 |
2) Use a second table for inventory movements
Don’t manually edit stock in the products table every time. Instead, record every change.
Transactions table
- Transaction ID
- Date
- Product ID
- Type:
in,out,adjustment - Quantity
- Reference/Notes
Example:
| Transaction ID | Date | Product ID | Type | Quantity | Notes |
|---|---|---|---|---|---|
| T001 | 2026-01-10 | P001 | in | 50 | New shipment |
| T002 | 2026-01-12 | P001 | out | 8 | Customer sale |
| T003 | 2026-01-13 | P002 | out | 2 | Damaged stock |
3) Calculate current stock automatically
Current stock should be computed from the transaction history:
Current Stock = total stock in - total stock out + adjustments
In spreadsheet terms:
- Use
SUMIF/SUMIFSto total transactions by product - Or a database formula/query to calculate net stock
Example logic:
- Sum all
in - Subtract all
out - Add/subtract
adjustment
4) Add a low-stock alert
Create a field or formula to flag items below reorder level:
Low Stock? = Current Stock <= Reorder Level
You can use conditional formatting to highlight these rows.
5) Create supporting tables if needed
Depending on complexity, you may want:
- Suppliers table
- Orders table
- Customers table
- Locations/Warehouses table
This helps avoid repeating the same data in multiple places.
6) Best practices
- Use unique IDs for every product and transaction
- Don’t store “current stock” as a manually edited number if you can avoid it
- Keep all stock changes in the transaction table
- Use data validation for fields like
TypeandCategory - Back up the database regularly
- If you have multiple locations, track stock by location too
Simple structure to start with
If you want the easiest setup:
- Products
- Transactions
- Suppliers (optional)
- Orders (optional)
If you want, I can also give you:
- a sample spreadsheet template
- a formula example for Excel/Google Sheets
- or a database schema for Airtable/Notion/SQLite