+ Reply to Thread
Results 1 to 11 of 11

Calculation of a certain number of hours out of 24 over multiple days

  1. #1
    Registered User
    Join Date
    05-11-2018
    Location
    USA
    MS-Off Ver
    newest
    Posts
    6

    Calculation of a certain number of hours out of 24 over multiple days

    I am looking to place a formula in cell D1 that will show 14 paid hours per 24 hour period minus 2 hours from the start. In cell E1 I need the same only 6 hours from start.

    For example. In the attached spreadsheet in cell A1 is 4/10 13:00. In cell B1 is 4/12 18:00. In cell C1 is =(B1-A1)*24. I need cell D1 to equal 31 and cell E1 to equal 28.

    For D1, 2 hours are free which takes the start time for the calculation to 4/10 15:00. 14 hours out of every 24 hour period is billed. (4/10 15:00 to 4/11 15:00=14, 4/11 15:00 to 4/12 15:00=14, 4/12 15:00 to 4/12 18:00=3 for a total of 31 hours invoiced.

    For E1, 6 hours are free which takes the start time for the calculation to 4/10 19:00. 14 hours out of every 24 hour period is paid. (4/10 19:00 to 4/11 19:00=14, 4/11 19:00 to 4/12 18:00=14 for a total of 28 hours billed)

    Is there a formula or macro I can use to do this calculation?

  2. #2
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Calculation of a certain number of hours out of 24 over multiple days

    Hi,

    Did E1 should be 27 instead?

    if yes,
    you may apply this two formula for a meanwhile,
    as it may have formula that more simply

    i use mod to get the hrs that no enough one day, and add in days that multiple with 14.

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


    In E1,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by BoredWorker; 05-11-2018 at 03:15 AM.
    Hope you can learn every time you visit here.

    If you still confuse on how it work, kindly ask or go to
    i) Formula - Formula (Ribbon) > Formula Auditing (Section) > Evaluate Formula > Evaluate; or
    ii) VBA/Code - Click F8 to see how it work step by step.

    It it take care of your question, Please:
    Mark tread as [Solved] [Thread Tools->Mark thread as Solved]
    ;and
    Click *Add Reputation to thank anyone solved your question.

  3. #3
    Registered User
    Join Date
    05-11-2018
    Location
    USA
    MS-Off Ver
    newest
    Posts
    6

    Re: Calculation of a certain number of hours out of 24 over multiple days

    No, it should be 28 hours. The first 6 hours are free. That would change the beginning time of the calculation to 19:00. We then pay 14 hours out of every 24 hours period, which would be 28 hours in this case.

    I also apologize for lack of a spreadsheet attachment. It would not allow me to attach the sheet.
    Last edited by Bernice75; 05-11-2018 at 03:34 AM.

  4. #4
    Registered User
    Join Date
    05-11-2018
    Location
    USA
    MS-Off Ver
    newest
    Posts
    6
    Thank you so much for the first formula, so far with my testing it is working perfectly for what I need it to do!! I'll be testing it even more extensively tomorrow.

    Quote Originally Posted by BoredWorker View Post
    Hi,

    Did E1 should be 27 instead?

    if yes,
    you may apply this two formula for a meanwhile,
    as it may have formula that more simply

    i use mod to get the hrs that no enough one day, and add in days that multiple with 14.

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


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

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Calculation of a certain number of hours out of 24 over multiple days

    There are other cases of duration, i.e 4/10 1:00:00 PM to 6/10 11:00:00 AM (end time is smaller than start time)
    Upload a sample WS with more expected results.
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Quang PT

  6. #6
    Registered User
    Join Date
    05-11-2018
    Location
    USA
    MS-Off Ver
    newest
    Posts
    6

    Re: Calculation of a certain number of hours out of 24 over multiple days

    It is not something that the process shows up on an excel sheet. Right now we are manually calculating all of these results manually and inputting the resulting number on the spreadsheet. I tried to upload my sample workbook earlier, but it told me the page does not exist when I clicked on upload. I do not have a "go advanced" anywhere on this page.

  7. #7
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Calculation of a certain number of hours out of 24 over multiple days

    one question to ask,

    how the hours is count if the day is more 14 hours but less the 24 hours.
    Last edited by BoredWorker; 05-11-2018 at 04:18 AM.

  8. #8
    Registered User
    Join Date
    05-11-2018
    Location
    USA
    MS-Off Ver
    newest
    Posts
    6

    Re: Calculation of a certain number of hours out of 24 over multiple days

    I'm not sure if this is going to work.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-11-2018
    Location
    USA
    MS-Off Ver
    newest
    Posts
    6

    Re: Calculation of a certain number of hours out of 24 over multiple days

    if the day is longer than 14 and less than 24 we pay 14 hours.

  10. #10
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Calculation of a certain number of hours out of 24 over multiple days

    try

    D1

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

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

  11. #11
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Calculation of a certain number of hours out of 24 over multiple days

    Try:
    For 2 free hours:
    Please Login or Register  to view this content.
    Change 2 to 6

+ 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. Due Date Calculation by taking only working hours and days
    By Prashanth Gangala in forum Excel General
    Replies: 13
    Last Post: 10-10-2017, 05:15 PM
  2. [SOLVED] Convert number to Days/hours/Minutes after 31 days
    By MB77035 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2015, 11:45 AM
  3. [SOLVED] Timesheet with overtime calculation between certain hours, days only
    By ExcelNoviceHexham in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-02-2013, 12:21 PM
  4. Calculation of bussiness days and hours
    By Rekha in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2011, 03:09 AM
  5. translate 'days, hours, mins' calculation from sheet to VBA
    By rawtech in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-07-2011, 02:24 AM
  6. Hours and number calculation - how
    By snorrekatt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-21-2006, 10:33 AM
  7. Working days and hours calculation - request assistance please!
    By sbickley in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2006, 02:45 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