+ Reply to Thread
Results 1 to 4 of 4

Calculating Work hours overnight with a 6th hour meal period

  1. #1
    Registered User
    Join Date
    11-16-2014
    Location
    Carlsbad, California
    MS-Off Ver
    2013
    Posts
    2

    Calculating Work hours overnight with a 6th hour meal period

    Good Morning,
    I have search the forum to no avail. I'm am trying to make a work schedule that will calculate a 30 meal period if a employee works a 6 hour shift. and also calculate time right when working a overnight shift. The current setup i have is
    B5=10:30 pm (START SHIFT)
    C5=6:30 am (END SHIFT)
    =(C5-B5)*24-IF((C5-B5)*24>5,0.5,IF((C5-B5)*24>6,0.5,0)). This is the formula i have now. It does great with the 30 meal period after the 6th hour. but when i throw in a overnight it gives me a negative answer.

    Thank you for your time
    Ryan

    Schedule WE 11-30-14.xlsx

  2. #2
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Calculating Work hours overnight with a 6th hour meal period

    Hi,

    Try below formula:

    =MOD(C5-B5,1)*24-IF(MOD(C5-B5,1)*24>5,0.5,IF(MOD(C5-B5,1)*24>6,0.5,0))

    But I still don't understand using two condition in IF >5 & >6 with same result of 0.5 , I think it can be reduced to one as >5.

    Regards,

  3. #3
    Registered User
    Join Date
    11-16-2014
    Location
    Carlsbad, California
    MS-Off Ver
    2013
    Posts
    2

    Re: Calculating Work hours overnight with a 6th hour meal period

    Thank you Misrasmendra,
    I dont have time right now to look in detail at the equation. But when i inserted your formula it worked. I got the formula i had before from a different forum. When i get home im gonna play with it some more. And make sure it takes a 30 minute meal period out at the 6th hour.
    THIS IS AWESOME!!

    Thank you again Misrasomendra

  4. #4
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Calculating Work hours overnight with a 6th hour meal period

    Thanks for the feedback and glad it worked for you.

    Regards,

+ 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. Replies: 17
    Last Post: 06-09-2013, 01:06 AM
  2. Replies: 3
    Last Post: 07-11-2012, 12:37 PM
  3. Calculating monthly work hours;including 30min break;using 12 hour instead of 24
    By MichaelProcter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2011, 08:51 PM
  4. Replies: 4
    Last Post: 10-14-2010, 03:31 PM
  5. Calculating Time across a 24 hour period
    By jmag in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2007, 12:27 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