Hi there,
I am trying to get a formula to substract a value based on several criteria:
As you can see below, this is table from gas Company that sends data in Excel regarding truck gas fill ups. In Km column, I would like to have a formula which will calculate difference in kilometers between each gas fill up. For example the truck lic. plate MB GV 403, the kilometer difference between two fill ups (2.8.2018, and previous fill up on 27.7.2018) is 2660 km. Trucks can have one, two, or three tanks, so that is why you have two gas fill up on the the same date with same kilometer amount. Also, I would like formula to only calculate Diesel in Gas column, not Urea. I hope that I clarified it enough for you to understand my goal and hope you could provide me with the solutions.
I tried sumifs formula that was working only if there was one tank truck, but sum range will sum every row with the same date....
Table is attached for better viewing.
Table.png
Bookmarks