+ Reply to Thread
Results 1 to 3 of 3

calculating mileages for several vehicles

  1. #1
    Registered User
    Join Date
    04-21-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    1

    calculating mileages for several vehicles

    This is a current spread sheet that I am using to track vehicle mileage (sample of information)
    I have 5 trucks and their unit # is listed in the 2nd last column.
    I want to subtract their previous recorded mileage from their most recent recorded mileage to get the total miles they had driven on a particular fill up.
    Column 2 is the subtraction (manually now), column 6 is the truck ID #, and column 7 is the mileage recorded for that fill up.


    4-Apr-14 255 60.951 1.247 $76.01 9 66388
    4-Apr-14 553 90.620 1.247 $113.00 5 286014
    4-Apr-14 319 80.068 1.249 $100.00 7 73776
    4-Apr-14 179 44.387 1.239 $55.00 8 60450
    12-Apr-14 475 113.219 1.369 $155.00 8 60925
    12-Apr-14 481 116.876 1.369 $160.00 9 66869
    12-Apr-14 468 117.293 1.369 $160.57 7 74244
    12-Apr-14 373 60.205 1.369 $82.42 5 286387
    19-Apr-14 174 41.019 1.341 $55.01 9 67043
    19-Apr-14 364 104.401 1.341 $140.00 6 89158
    19-Apr-14 353 80.545 1.341 $108.01 8 61278
    19-Apr-14 530 89.723 1.341 $120.32 5 286917
    19-Apr-14 306 75.326 1.341 $101.01 7 74550

    Right now I am manually calculating the 2nd column by finding the previous entry for that truck.
    The spacing changes because some trucks get used more and filled up more often.
    I keep thinking there must be a way to do a lookup to find the previous truck number and then return the second column of its mileage, but I think the sortation of my columns is backwards to do that.

    The spacing on the columns looks better when I am typing the post... they get tight when I actually post it.

    Can anyone help out?
    Thanks
    Chad

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: calculating mileages for several vehicles

    Please post your excel file, this will help to solve the problem.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: calculating mileages for several vehicles

    Perhaps ...

    F
    G
    H
    I
    1
    Veh ID
    Odo
    Miles
    2
    9
    66,388
    ??
    H2: =IFERROR(G2 - LOOKUP(2, 1/(F$1:F1=F2), G$1:G1), "??")
    3
    5
    286,014
    ??
    4
    7
    73,776
    ??
    5
    8
    60,450
    ??
    6
    8
    60,925
    475
    7
    9
    66,869
    481
    8
    7
    74,244
    468
    9
    5
    286,387
    373
    10
    9
    67,043
    174
    11
    6
    89,158
    ??
    12
    8
    61,278
    353
    13
    5
    286,917
    530
    14
    7
    74,550
    306
    Entia non sunt multiplicanda sine necessitate

+ 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. Excel 2007 : Mileages
    By UKAndy in forum Excel General
    Replies: 5
    Last Post: 07-03-2010, 04:59 PM
  2. Allocating vehicles to times
    By tessda in forum Excel General
    Replies: 2
    Last Post: 10-15-2008, 05:52 PM
  3. Working with mileages
    By kiakanpa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2007, 05:46 AM
  4. Formula Help: Vehicles On Railcars
    By meyerstc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2006, 01:50 PM
  5. Calculate percentage for vehicles
    By rhani111 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-27-2005, 10:36 PM

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