+ Reply to Thread
Results 1 to 3 of 3

Problem with multiple columns subtracting off each other

  1. #1
    Registered User
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2003
    Posts
    9

    Problem with multiple columns subtracting off each other

    Hi,

    This may be a simple fix I'm overlooking but I can't seem to make this work.

    Here's what I'm trying to do (spreadsheet attached), I am trying to track odometer readings for trucks per quarter AND show the total mileage driven per quarter on a separate set of columns. Sounds easy, but to make the miles driven per quarter show up, I have a formula set up to subtract Quarter 1's odometer from Q2's odometer (this shows the amount of miles driven for the quarter), then I have Q2 setup to subtract from Q3 and so on and so forth. Problem is, the sheets show negatives because the 2nd quarter hasn't happened yet so the 1st quarter is subtracting miles from 0.

    Is there anyway I can set this up so I can just punch in odometer readings and have this thing spit out a miles driven per quarter without these negative numbers?

    Here is what I'm looking at.
    example.xlsx

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,729

    Re: Problem with multiple columns subtracting off each other

    Presumably, column H is the miles driven in Q4 of 2014, but you also need the odometer reading at the start of Q1 of 2015 in order to subtract that from the next quarter's reading. OR, is that what you have in column C? If so, then you will need another column to record the end of Q4 2015/start of Q1 2016 - assume this is column G. Then you can have this formula in K5:

    =IF(C5="","",IF(D5="","",D5-C5))

    Copy this across into L5:N5, and change the formula in O5 to this:

    =SUM(K5:N5)

    which is more tolerant if cells are blank. Then copy those formulae down as far as you need them.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Problem with multiple columns subtracting off each other

    That was exactly what I was looking for. You're a gentleman and a scholar.

    Thanks!

+ 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: 6
    Last Post: 02-28-2014, 09:34 AM
  2. Replies: 1
    Last Post: 10-23-2012, 10:41 AM
  3. Replies: 9
    Last Post: 09-18-2012, 09:16 PM
  4. i have a problem adding and subtracting 3 columns ...
    By Abdullah Ahmad Ali in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-22-2012, 10:03 AM
  5. time subtracting problem
    By izbryte in forum Excel General
    Replies: 5
    Last Post: 04-28-2005, 11:26 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