+ Reply to Thread
Results 1 to 4 of 4

How do I calculate the number of night hours worked

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    4

    How do I calculate the number of night hours worked

    Hi

    Can some please help me to calculate the number of hours worked between 18:00 and 06:00.
    Attached is a copy of what I have so far, I have formulas in place to calculate total hours worked, less lunch, regular and overtime hours. But I'm still calculating night hours manually. What is the formula to calculate this.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: How do I calculate the number of night hours worked

    Try this in K9:

    =(F9+E9-A9-B9-D9+C9)*24

    Hope this helps.

    Pete

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: How do I calculate the number of night hours worked

    I used this formula in K4 copied down

    =IF(COUNT(B4:E4)=4,H4-(B4>C4)*12-MEDIAN(C4*24,6,18)+MEDIAN(B4*24,6,18)-(D4>E4)*12-MEDIAN(E4*24,6,18)+MEDIAN(D4*24,6,18),"")
    Audere est facere

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    4

    Talking Re: How do I calculate the number of night hours worked

    Many thanks Pete, but this calculates the same as my column H

    Daddylonglegs ...this works perfectly!! many thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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