+ Reply to Thread
Results 1 to 12 of 12

Need help to create a Excel sheet for calculating average annual mileage

  1. #1
    Registered User
    Join Date
    12-21-2020
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    43

    Need help to create a Excel sheet for calculating average annual mileage

    Hi!

    I work with insurance, and during customer meetings, I need to calculate the average number of kilometers customers drive per year with each of the car they own.
    I'm looking for help to create an Excel sheet that can do this easily.

    The data I receive from customers includes:

    1. The last recorded mileage (e.g., 07.06.2022 = 104,687 kilometers).
    2. The mileage recorded on the current date (e.g., 29.08.2024 = 204,561 kilometers).

    I need a sheet that can calculate:

    - The number of months between the two dates.
    - The average number of kilometers driven per month(or per day if that gives better data)
    - The average number of kilometers driven per year.

    The information I enter in the cells should be easily replaceable for each new meeting.

    I've made a basic example of what I'm trying to achieve.
    Feel free to do it the way you would do it, I'm sure ut can be done a better way than my examples.

    Any help with this would be greatly appreciated.
    Attached Files Attached Files
    Last edited by PTLS; 08-29-2024 at 05:51 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,052

    Re: Need help to create a Excel sheet for calculating average annual mileage

    Did you mean to post in the VBA section? Seems like a formula request to me. I can move the thread if necessary.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,052

    Re: Need help to create a Excel sheet for calculating average annual mileage

    How do you want to define a month? 30 days? Or something else?

    B6 contains text, not a date (but can be converted).

    There are 26 months between the two dates - how do you arrive at 24.8?

  4. #4
    Registered User
    Join Date
    12-21-2020
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    43

    Re: Need help to create a Excel sheet for calculating average annual mileage

    Please move thread if this is wrong place

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,052

    Re: Need help to create a Excel sheet for calculating average annual mileage

    Number of months:

    =ROUND(DATEDIF(B5,SUBSTITUTE(B6,".","/")+0,"m")+((DATEDIF(B5,SUBSTITUTE(B6,".","/")+0,"md")/30)),1)

    Total distance:

    =C6-C5

    Average per momth:

    =ROUND(C13/C12,2)

    Average per year:

    =C14*12

    See the attached for your locale. You might need to change m and md if Norwegian words for month and day start with different letters.
    Attached Files Attached Files
    Last edited by AliGW; 08-29-2024 at 05:11 AM.

  6. #6
    Registered User
    Join Date
    12-21-2020
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    43

    Re: Need help to create a Excel sheet for calculating average annual mileage

    I define a month as 30 days.

    B6 is supposed to contain the date: 29.08.2024

    Was supposed to write 26.8 (It's almost 27 months in the example)

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,052

    Re: Need help to create a Excel sheet for calculating average annual mileage

    OK - see post #5.

    It's 26.73, actually, which rounds to 26.7.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,052

    Re: Need help to create a Excel sheet for calculating average annual mileage

    Total distance for car 2:

    =LET(s,SUBSTITUTE(C10:C11," km",""),TAKE(s,-1)-TAKE(s,1))
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-21-2020
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    43

    Re: Need help to create a Excel sheet for calculating average annual mileage

    Thanks alot, both works great!

    If I may ask one more thing and you would be so kind.

    Can you make another example of how you would do it on a blank "sheet" if you hadn't seen my examples first?

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,052

    Re: Need help to create a Excel sheet for calculating average annual mileage

    The only thing I would change would be the distance input (DON'T add " km" - just enter a number) and the date that isn't a date - just enter a date properly.

    I would not have done this without a workbook to see where you were going with it, so no, I won't recreate the wheel for you, sorry.

    Off into a sunny garden now to dig out some roots.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  11. #11
    Registered User
    Join Date
    12-21-2020
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    43

    Re: Need help to create a Excel sheet for calculating average annual mileage

    Np! Thanks again.

    I will, have a good day!

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,052

    Re: Need help to create a Excel sheet for calculating average annual mileage

    You, too.

+ 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. Annual Accounting Worksheet - Mileage Macro Help Required
    By BG0612 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2020, 10:42 AM
  2. Calculating the average annual cost over 5 years with multiple durations
    By elysiumukexcelforum in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-07-2017, 12:34 PM
  3. Calculating Average Annual Returns from a Series of Annual Returns
    By Bruinsfan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-03-2012, 09:50 PM
  4. Calculating Annual Average?
    By mycon73 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-17-2009, 11:05 AM
  5. Trying to create mileage log from one sheet to another
    By drillguy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-26-2008, 08:19 PM
  6. Calculating average annual change in real estate value
    By James Hobart in forum Excel General
    Replies: 5
    Last Post: 03-28-2006, 12:00 AM
  7. Calculating Average Annual Growth
    By John Sharp in forum Tips and Tutorials
    Replies: 2
    Last Post: 08-29-2005, 07:36 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