1. ## Excel formula.

I am trying to create a motor kilometres formula. Simply in two columns I want to show total of kilometres travelled by the car and in the second column, actual kilometres travelled since I last filled the car.

ie: Current total of Car = 33000.
Current total of Car = 33500. Kilometres since last filled = 500
Current total of Car = 34200. Kilometres since last filled = 700

So what I want to do is find a formula that will automatically calculate each Kilometres, since last filled. In column D, =SUM(C2:-C1) doesn't work. 2. ## Re: Excel formula.

=C2-\$C1 ?? 3. ## Re: Excel formula.

=C2-C1
=C3-C2
=C4-C3

Copying that down the screen will automatically increment the cell numbers. 4. ## Re: Excel formula.

Used to do a similar thing for bh's private work mileage: 5. ## Re: Excel formula.

Thank you gentlemen. I'm now on the right track. 6. ## Re: Excel formula.

I prefer to use an "If" Function as just doing a Subtraction will give some funny results until the Primary number has been entered for that Row.

Subtraction only =SUM(C2-C1)
With If Function =IF(C2;C2-C1;"")
Note in both cases shown here the Formula is actually started in Row 2.
You can of course add Headers at the top (which I presume you have). #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•