+ Reply to Thread
Results 1 to 8 of 8

Calculate total hours that fall between a specific date / time period (Over midnight)

  1. #1
    Registered User
    Join Date
    10-17-2019
    Location
    Stockholm
    MS-Off Ver
    365 ProPlus
    Posts
    70

    Calculate total hours that fall between a specific date / time period (Over midnight)

    Good morning,

    I would need a formula for the cell highlighted in yellow in the attached file.

    Basically the operator work from 9.00 to 17.00.

    I need to know the overtime hours in a specific time range in a month and calculate different totals per different time range.

    I used this formula:

    =(NETWORKDAYS(start,end)-1)*(upper-lower)
    +IF(NETWORKDAYS(end,end),MEDIAN(MOD(end,1),upper,lower),upper)
    -MEDIAN(NETWORKDAYS(start,start)*MOD(start,1),upper,lower)

    and I would know if it can be readapted with upper and lower inverted as in my case (time range 22.00 to 6.00 and thus different from sort 00 - 23)

    I know you can help me... pleaseee!!!
    Attached Files Attached Files
    Last edited by nik_re; 04-21-2020 at 03:12 AM.

  2. #2
    Registered User
    Join Date
    10-17-2019
    Location
    Stockholm
    MS-Off Ver
    365 ProPlus
    Posts
    70

    Re: Calculate total hours that fall between a specific date / time period (Over midnight)

    I mean.... whatever formula will solve the column D6:D14 will be appreciated.

  3. #3
    Forum Contributor Toonies's Avatar
    Join Date
    07-30-2009
    Location
    Newcastle, UK
    MS-Off Ver
    Excel 2016
    Posts
    503

    Re: Calculate total hours that fall between a specific date / time period (Over midnight)

    hi try this in D6

    Please Login or Register  to view this content.
    its a Daddylongleg Formula


    https://www.excelforum.com/excel-gen...t-and-end.html

  4. #4
    Registered User
    Join Date
    10-17-2019
    Location
    Stockholm
    MS-Off Ver
    365 ProPlus
    Posts
    70

    Re: Calculate total hours that fall between a specific date / time period (Over midnight)

    I have just tried and it seems to work.... Iīm in love DAY formula... wow
    thank you so much . I am so happy.... donīt know how to explain.

    Iīll try a bit this formula and then Iīll solve the thread.

    Thank you Thank you Thank you )))))))))))))))))

  5. #5
    Forum Contributor Toonies's Avatar
    Join Date
    07-30-2009
    Location
    Newcastle, UK
    MS-Off Ver
    Excel 2016
    Posts
    503

    Re: Calculate total hours that fall between a specific date / time period (Over midnight)

    don't thank me thank Daddylonglegs

  6. #6
    Registered User
    Join Date
    10-17-2019
    Location
    Stockholm
    MS-Off Ver
    365 ProPlus
    Posts
    70

    Re: Calculate total hours that fall between a specific date / time period (Over midnight)

    I donīt know who is Daddylonglegs but I was not able to find any solution... you did it. Who is Daddylonglegs?

  7. #7
    Forum Contributor Toonies's Avatar
    Join Date
    07-30-2009
    Location
    Newcastle, UK
    MS-Off Ver
    Excel 2016
    Posts
    503

    Re: Calculate total hours that fall between a specific date / time period (Over midnight)

    they are a Forum Moderator on here and have much greater knowledge of Excel than I ever will

    the Credit goes to them

  8. #8
    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,626

    Re: Calculate total hours that fall between a specific date / time period (Over midnight)

    Quote Originally Posted by nik_re View Post
    I donīt know who is Daddylonglegs but I was not able to find any solution... you did it. Who is Daddylonglegs?
    Follow the link at the bottom of post #3.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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. [SOLVED] Calculate total hours that fall between a specific time period (Over midnight)
    By nik_re in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-20-2020, 09:06 AM
  2. [SOLVED] Formula Needed - Calculate total hours that fall between a specific time period.
    By JennyGP in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 04-19-2020, 02:44 AM
  3. Calculate how many hours fall between a set date and time range
    By elleb in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-14-2018, 03:55 PM
  4. [SOLVED] Formula to calculate: # of hours in a timespan that fall between Midnight and 6AM
    By Deicidium in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-23-2015, 05:05 PM
  5. Replies: 13
    Last Post: 11-04-2013, 02:30 AM
  6. Replies: 9
    Last Post: 07-26-2012, 10:01 PM
  7. Calculate total Hours between 2 date and time
    By Tylim in forum Excel General
    Replies: 3
    Last Post: 05-08-2006, 10:20 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