This is my very first post here. I am currently working on a calc spreadsheet for a personal inventory.

During this process, I think I have to use the SUMIF function, and I managed to do so. However, I cannot get the SUMIF function to sum up values with respect to their corresponding cell.

Data Batch KG in KG out Total (KG)

12.06.2019 1 10 0 10

13.06.2019 2 30 0 0 10

14.06.2019 1 20 0 20

15.06.2019 1 10 0 10

16.06.2019 2 15 0 0

I need to add a specific amount (KG) of several batches of products. The problem is that the batches are not one under another, and they may alternate. How do I make the function to add each KG of each batch separately into a daily total?

So, on the 14th of June 2019, I want to automatically obtain 30, meaning also the 12.06.2019 with respect to Batch number 1, and on the 15 of June I want to obtain 40. The same applies to batch 2 on 13.06 and 16.06 (45).

This is the SUMIFS I used

- Code: Select all Expand viewCollapse view
`=(SUMIFS(C2,B2,"=1"))-(SUMIFS(D2,B2,"=1"))`