+ Reply to Thread
Results 1 to 4 of 4

Mileage Calculator -- Finding lowest row matching specific values

  1. #1
    Registered User
    Join Date
    07-06-2011
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Mileage Calculator -- Finding lowest row matching specific values

    Hi, I'm building a spreadsheet containing vehicle service data for a group of vehicles. I have Date (A), Vehicle ID (B), Mileage (C), and Service (D).

    For the convenience of people viewing this spreadsheet, I wanted to make a summary table containing each vehicle in the first column, mileage reading for next oil change, and date for next oil change. In order to do this, I need a formula that returns the mileage from the most recent mileage/date row where Vehicle ID = X and Service = "Oil Change". I have had difficulty finding the correct combinations of formulas to get this to work, and would appreciate any assistance in doing this.

    In summary, the formula needs to filter out all rows where Service =/= "Oil Change", then do a further filter where Vehicle ID =/= X, then return the mileage/date data from the lowest (most recent) row. It doesn't have to necessarily "filter" the rows, I just thought that'd be the easiest way to understand my question.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Mileage Calculator -- Finding lowest row matching specific values

    Can you upload example workbook?

  3. #3
    Registered User
    Join Date
    07-06-2011
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Mileage Calculator -- Finding lowest row matching specific values

    I don't quite have enough data inputted to make an example useful, but here it is:
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-06-2011
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Mileage Calculator -- Finding lowest row matching specific values

    The point of this function would be to quickly identify if a particular car is due for an oil change or servicing. I plan on having the main data table consist of every single maintenance work done on the vehicles, then the second data table consisting of a simple chart that displays the mileage or date that the next oil change should occur at.

    So the overall idea would be something like this:
    For vehicle # 293:
    Mileage for next oil change = Mileage at last oil change + 4000.

    To identify the mileage at last oil change, the function would have to determine the lowest row where Service = "Oil Change" and vehicle ID = "293", then return the contents of the cell in the Mileage column of that lowest row.
    Last edited by brine; 07-06-2011 at 01:45 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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