+ Reply to Thread
Results 1 to 8 of 8

subtract cells and add up differences in last cell as a total

  1. #1
    Registered User
    Join Date
    05-30-2014
    Posts
    3

    subtract cells and add up differences in last cell as a total

    EX:
    1200
    1205
    1210
    1215

    Cell with total should contain 15

    These are mileage numbers. At the end I need to know the total miles driven as miles are added. I need to be able to see the total miles driven as mileage is added. At the end of the week, I need to see total miles driven.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: subtract cells and add up differences in last cell as a total

    I'd probably find the max then subtract the min in your data range to get the mileage.

    Use the MAX and MIN formulas
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: subtract cells and add up differences in last cell as a total

    May be this.......

    Assuming you have mileages in col. A starting from A2

    Please Login or Register  to view this content.
    So as per the formula A2 will always the minimum mileage and as per your example you have only 4 mileages listed in the column in the range A2:A5. The formula will auto calculate the total distance traveled once you add another mileage down the rows.

    You can adjust the range within the Max function as per your need.
    Last edited by sktneer; 05-31-2014 at 12:28 AM.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: subtract cells and add up differences in last cell as a total

    One way...

    Data Range
    A
    B
    C
    1
    OD Reading
    ------
    Total
    2
    1200
    58
    3
    1205
    4
    1210
    5
    1215
    6
    1245
    7
    1258
    8
    9
    10


    This formula entered in C2:

    =LOOKUP(1E100,A:A)-A2
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    05-30-2014
    Posts
    3

    Re: subtract cells and add up differences in last cell as a total

    Formulas don't calculate as shown that they should.

    I am using excel 2010


    column A column L
    Friday 1,500
    Saturday 1,520
    Sunday 1,525
    Monday 1,530
    Tuesday 1,535
    Wednesday 1,540
    Thursday 1,545

    total: 45 (this #represents total miles driven)

    Each day that you add mileage, the number at the bottom should continuous track total miles driven

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: subtract cells and add up differences in last cell as a total

    Works OK for me.

    Data Range
    A
    B
    C
    D
    E
    1
    ------
    ------
    ------
    ------
    ------
    2
    Friday
    1,500
    Total
    45
    3
    Saturday
    1,520
    4
    Sunday
    1,525
    5
    Monday
    1,530
    6
    Tuesday
    1,535
    7
    Wednesday
    1,540
    8
    Thursday
    1,545
    9
    10


    This formula entered in E2:

    =LOOKUP(1E100,B:B)-B2

    What result do you get?

  7. #7
    Registered User
    Join Date
    05-30-2014
    Posts
    3

    Re: subtract cells and add up differences in last cell as a total

    It calculates a zero. Mine looks like
    =LOOKUP(1E100,L:L)-L7
    Attached Files Attached Files

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: subtract cells and add up differences in last cell as a total

    The problem is that you have a circular reference.

    Try this one...

    =MAX(L7:L13)-L7

    Then you can copy that formula and paste it into L22, L30, L38. L46 and L54.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 24
    Last Post: 10-08-2014, 10:31 AM
  2. Add or subtract from total
    By John Mathieson in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-24-2014, 11:53 PM
  3. Sequentially subtract range of cells to match new total.
    By jlnunes5 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2013, 04:40 PM
  4. [SOLVED] Subtract A2 from A1 and Percentage the total in same cell
    By kryptic in forum Excel General
    Replies: 2
    Last Post: 09-09-2010, 10:08 AM
  5. Subtract a group of cells from a total based on ending date
    By Nicholas Scarpinato in forum Excel General
    Replies: 0
    Last Post: 05-17-2005, 11:06 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1