+ Reply to Thread
Results 1 to 6 of 6

KM traveled per month, per car

  1. #1
    Registered User
    Join Date
    01-21-2019
    Location
    Quito, Ecuador
    MS-Off Ver
    2010
    Posts
    2

    Unhappy KM traveled per month, per car

    Hello everyone! is my first post
    well, i've been working on this database (see down): it's a database containing the kilometers traveled by car, so you have: Column1: the date that the measurement was made, Column2: the vehicle registration plate and in column 3, the km measured in the point of time by vehicle;

    So, What i need is a formula to calculate the km traveled per month, per car
    For example:

    Date Car Plate Kilometers
    7/4/2018 PCH8907 100
    7/9/2018 PCH8907 105
    7/16/2018 PCH8907 110
    7/24/2018 PCH8907 115
    7/29/2018 PCH8907 120
    8/2/2018 PCH8907 125
    8/10/2018 PCH8907 130

    In this case, the car PCH8907 traveled 20km in July 2018 and 10km in august.


    I've been trying everything, but i hadn't had success so far

    I'm desperate..
    Pls help me.


    Thank you very Much! waiting to see responses

    (Note: the database i'm showing you is just an example), real database has 200 cars and 12 months data.


    Edit! Thank you all for the help! I used a Pivot Table to see max and min values per month, and then just substracted it. Thank you
    Attached Files Attached Files
    Last edited by Mauricio Vallejo; 01-23-2019 at 12:08 PM. Reason: attachment

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: KM traveled per month, per car

    Are you open to using a pivot table?
    EDIT - Sorry I thought you wanted the sum of kilometers...ignore pivot table.

    Attach your sample workbook...

    Go Advanced -> Manage Attachments -> Upload
    Last edited by kersplash; 01-21-2019 at 09:02 PM.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: KM traveled per month, per car

    Take a look at using SUMIFS()
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: KM traveled per month, per car

    Formula wise I take the Kilometers to be cumulative odometer readings.

    With a helper column D for miles between odometer readings. Try this array formula in E2 and filled down.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Dave

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: KM traveled per month, per car

    Or in same workbook column E this non array formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: KM traveled per month, per car

    Hi Mauricio

    I choose a solution to give you more flexibility with the data. I added a column in the table for trip distance. that looks like this

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Now you have a distance of each trip. and then you can calculate the distance traveled per any timeperiod more easy using pivottable of sumifs.

    I build an example file to show you some reporting options and the data setup..
    Attached Files Attached Files

+ 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. Rounding hours/minutes traveled to nearest quarter
    By jbrottman in forum Excel General
    Replies: 7
    Last Post: 04-27-2016, 09:03 AM
  2. Can I use a formula for distance traveled? Thank you.
    By Zach Boyer in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-29-2016, 04:31 PM
  3. [SOLVED] Calculation of days per month for dates beginning in one month and ending in another month
    By Fahrettin in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2015, 04:52 PM
  4. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  5. [SOLVED] Counting & summing formula (until last month,this month,until this month..
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-12-2014, 01:14 PM
  6. [SOLVED] Auto instert Month names for This month, Last month and Next month
    By hemal89 in forum Word Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2013, 12:01 PM
  7. Loop/Array to Determine average distance traveled
    By Kwagga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-17-2008, 05:19 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