Excel (Online): How do you create order templates, ordered, to deduct from main inventory?

Copper Contributor

So I am trying to create order templates in one tab 
e.g. product A consists of 1,2 &3, product B consists of 1,4&5 etc
Then if customer A buys product A & customer B buys product A&B, in a separate second tab
How to I insert the different orders so the products would be added together then deducted in third tab for the inventory stock?

I managed to do an in and out stock levels but I cannot manage to do a template ordering of products when ordered by different customers to be added together then deducted from the main inventory stocks. Like by time and products of the products.


Anyone know where I can find a template? 


Hope it makes sense 
Thank you for your time


Here's the link


2 Replies





managed to do an in and out stock levels


If you want calculate the stock in hand or balance,I prefer input all stock in and out in one table so that you can get balance of each product more easily by sql


create temp table aa as 

select amount,debit,customer,memo,checked from stock where debit<>'select one' union all 

select -amount,credit,customer,memo,checked from stock where credit<>'select one' ;

select *,sum(amount) over ( partition by debit order by checked) balance from aa;


amount debit credit customer memo checked

10product_aselect onecustomer_abuy,increase stock2024-02-26 08:49:40-65dbe024c9fdd
2select oneproduct_acustomer_asale,decrease stock2024-02-26 08:50:15-65dbe04785fb8




select oneproduct_a product_b product_c 


select oneproduct_a product_b product_c