+ Reply to Thread
Results 1 to 5 of 5

Need to calculate the mileage. Mileage rounded down for 7 and under and up for 8 minutes

  1. #1
    Registered User
    Join Date
    09-15-2022
    Location
    North Carolina
    MS-Off Ver
    2208 (Build 15601.20088 Click-to-Run)
    Posts
    2

    Need to calculate the mileage. Mileage rounded down for 7 and under and up for 8 minutes

    Hello everyone!


    This is the first time posting here. Nice to see everyone assisting others with various Excel problems.

    I need help with the following problem, but first, let me start off with giving you my Office specifications.

    My Office is the subscription based Microsoft 365 Apps for Enterprise, which is displayed as Microsoft Office version 2208, (Build 15601 20088 Click-to-Run)

    Ok, now to the specific task I am having trouble with.


    I get paid $30.00 an hour from my boss. I am an Independent Contractor. I have downloaded a Simple Service Invoice for a service oriented business like Information Technologies and this downloaded Excel file that I downloaded does not have the correct formulas for calculating my mileage driven to and from a location. I tried attaching it here, but I am not seeing it displayed as I am typing this text.

    I clicked Manage Attachments here and then the upload, but I am NOT seeing my uploaded attachment included here. I do see it as a downloadable file now. So disregard.

    Cells A15 through E15 are formatted with the "General" details. A15 and B15 have the description of the service performed. Cells C,D and E are blank with no data.

    Cell F15 has QTY in it. Cell G15 has Unit Price in it. Cell H15 has Amount in it.

    * Cell A16 has Service Fee typed in it, which I basically just want to calculate my hours spent on the client's location in it. Currently, I worked 1 hour at $30/hr and that is what I have typed into the Service Fee cell. This $30.00 is typed into the cell underneath the cell with Amount in it.

    * Underneath Cell A16 in Cell A17, I have typed "Mileage" so I could add my mileage to it. I get paid the regular rate of $30.00 an hour, but the boss wants me to round down for 7 minutes or less, and calculate up if the time is 8 minutes or more. Cells A17 through F17 are currently formatted with the "General" information format. Problem I am having is: I simply typed $17.50 into cell G17 and in the H17 column named Amount, because I had driven 15 minutes to the job site. 15 minutes is 1/96th of a day. Everything looked fine to send off, so I clicked on cell H18 and then went to the Home Tab on the Excel Ribbon and I clicked on SUM to add cells H16 and H17 and the Total column showed the correct total, but also displays an error message saying "Inconsistent Formulas"

    If I am paid $30/hr for my services, should the Unit Price be $30.00? If I work 2 hours then I change the Unit Price to $60.00 or I probably should know the correct formula to have Excel handle that automatically for me. Currently, the QTY does work correctly with the UNIT PRICE and does increase the Amount column by $30.00. So UNIT PRICE is my HOURLY RATE and that is fine.

    The MILEAGE column is where I am having the trouble. I am paid .50 cents per minute to drive or $30.00 an hour, but I need to program Excel somewhere in F17, G17 and/or H17 to round down to the nearest 15 minutes. If I drive 7 minutes or less, than I want it to round down to the previous time. If I drive 8 minutes or more, then I want to to round up to the nearest time. For example If I leave my house at 12:00 pm and drive 7 minutes and stop at 12:07 pm then I want Excel to round down to 12:00 pm. If I lave my house at 12:00 pm and I drive 8 minutes and arrive at me destination at 12:08 pm, I would like Excel to round up to 12:15 pm

    I hope that I am explaining this accurately enough. I do not know how the pasting of this spreadsheet will go, so I am trying to explain it good without knowing of you can see the actual spreadsheet.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Need to calculate the mileage. Mileage rounded down for 7 and under and up for 8 minut

    Try

    =MROUND(A1,15/1440)

    A1=time and formatted as "hh:mm"
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    09-15-2022
    Location
    North Carolina
    MS-Off Ver
    2208 (Build 15601.20088 Click-to-Run)
    Posts
    2

    Re: Need to calculate the mileage. Mileage rounded down for 7 and under and up for 8 minut

    Modifying the Company Name cells A1, B1 and C1 to calculate time by hh:mm does not work for me.

    This form is not particularly the right form for what I want to use it for, but I thought that I could modify it easily.

    It is the mileage cells that need to be calculated. Cells A1, B1 and C1 are formatted using the general format. They should not be formatted to calculate the time. I believe it is cells F17 anf G17 that need to calculate the total mileage and display it in cell H17



    Your answer sounds as if you did not understand.
    Last edited by SadExcelUsr; 09-17-2022 at 10:52 AM. Reason: Clarification

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Need to calculate the mileage. Mileage rounded down for 7 and under and up for 8 minut

    I think, if I were John, I might take exception to your tone. Maybe you should explain your issue. The solution offered certainly seems to round up, or down, as you have said you want.

    12:01 12:00:00 =MROUND(A1,15/1440)
    12:02 12:00:00
    12:03 12:00:00
    12:04 12:00:00
    12:05 12:00:00
    12:06 12:00:00
    12:07 12:00:00
    12:08 12:15:00
    12:09 12:15:00
    12:10 12:15:00
    12:11 12:15:00
    12:12 12:15:00
    12:13 12:15:00
    12:14 12:15:00
    12:15 12:15:00
    12:16 12:15:00
    12:17 12:15:00
    12:18 12:15:00
    12:19 12:15:00
    12:20 12:15:00
    12:21 12:15:00
    12:22 12:15:00
    12:23 12:30:00
    12:24 12:30:00
    12:25 12:30:00
    12:26 12:30:00
    12:27 12:30:00
    12:28 12:30:00
    12:29 12:30:00
    12:30 12:30:00
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: Need to calculate the mileage. Mileage rounded down for 7 and under and up for 8 minut

    Please update your forum profile to MS365. Thanks.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Help to Calculate Mileage
    By RH_T7260 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-13-2022, 08:20 AM
  2. Calculate mileage
    By wildwestarena in forum Excel General
    Replies: 2
    Last Post: 01-29-2016, 09:38 PM
  3. Calculate Vehicle Mileage
    By esperanto in forum Excel General
    Replies: 3
    Last Post: 06-08-2015, 08:44 AM
  4. Calculate mileage between postocodes
    By akderitend in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 11-15-2012, 06:47 AM
  5. Replies: 5
    Last Post: 10-01-2012, 12:11 PM
  6. Calculate Mileage
    By rsikin in forum Excel General
    Replies: 5
    Last Post: 10-01-2005, 01:05 PM

Tags for this Thread

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