Results 1 to 6 of 6

Thread: Excel formula.

  1. #1
    Older by the minute
    Join Date
    Dec 2004
    Location
    Whitford
    Posts
    1,596

    Default 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. #2
    amateur expert dugimodo's Avatar
    Join Date
    Dec 2005
    Posts
    7,889

    Default Re: Excel formula.

    =C2-$C1 ??
    Ryzen 2700X, 16Gb DDR4RAM, 512GB M.2 NVME SSD, MSI GTX1070

  3. #3
    Old dick-head
    Join Date
    Jan 2007
    Location
    between Lower Hutt & Carterton
    Posts
    1,158

    Default Re: Excel formula.

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

    Copying that down the screen will automatically increment the cell numbers.

  4. #4
    Senior Member
    Join Date
    Dec 2004
    Location
    Christchurch
    Posts
    2,307

    Default Re: Excel formula.

    Used to do a similar thing for bh's private work mileage:
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Kms run.jpg 
Views:	28 
Size:	8.9 KB 
ID:	8673  

  5. #5
    Older by the minute
    Join Date
    Dec 2004
    Location
    Whitford
    Posts
    1,596

    Default Re: Excel formula.

    Thank you gentlemen. I'm now on the right track.

  6. #6
    Senior Member
    Join Date
    Jan 2016
    Posts
    115

    Default 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).

Similar Threads

  1. Excel formula
    By bpt2 in forum PressF1
    Replies: 10
    Last Post: 04-02-2008, 07:31 AM
  2. Excel formula
    By rodb in forum PressF1
    Replies: 4
    Last Post: 26-11-2005, 07:50 AM
  3. Excel Formula
    By Cyberman in forum PressF1
    Replies: 3
    Last Post: 20-07-2004, 03:54 PM
  4. Excel formula
    By tedheath in forum PressF1
    Replies: 6
    Last Post: 23-06-2003, 10:28 PM
  5. Excel Formula
    By in forum PressF1
    Replies: 0
    Last Post: 05-11-2000, 07:18 PM

Posting Permissions

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