I don't know how to create a formula in excel to get an actual balance of stock referring the date and selected item.
Attached is the file of example of my work.
The result should be like this.
For example, the balance of pencil on 2nd jan was 100, because on 1st jan got in-stock 100.
Balance of the pencil on 20th apr was 70, because at 4th and 19th feb there's deduction of 20 and 10.