+ Reply to Thread
Results 1 to 7 of 7

separate night from day hours

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    greece
    MS-Off Ver
    Excel 2007
    Posts
    4

    separate night from day hours

    hello

    i am trying for days now to find a solution ,but no luck (excel 2007).

    pls help

    i want to separate night hours 22:00-6:00
    fom day hours 6:00-22:00
    in my work plan.

    i am using all kind of shifts for example

    8:00-23:00 = 14 day hours 1 night hour
    21:00-7:00= 2 day hours 8 night hours.
    16:00-2:00=6 day hours 2 night hours

    any help pls!!!

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: separate night from day hours

    Can you post a sample workbook of exactly how you want your desired solution to look?
    Please click the * icon below if I have helped.

  3. #3
    Registered User
    Join Date
    03-12-2013
    Location
    greece
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: separate night from day hours

    Thanks for the reply,

    there is a sample, the reason i want to separate is that the employes get payd 25% for night hours [22:00-6:00] so i have to separate day from night hours to make the calculation.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: separate night from day hours

    Hi-Καλημέρα Ελλάδα.

    In C8, put this formula for day hours.

    =(C5>D5)*MEDIAN(0;D5-1/4;2/3)+MAX(0;MIN(11/12;D5+(C5>D5))-MAX(1/4;C5))

    In C9 put this one. This one subtract the day hours from the total hours. So the result is the night hours.

    =D5-C5+(C5>D5)-C8

    Copy across.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    03-12-2013
    Location
    greece
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: separate night from day hours

    ΚΑΛΗΜΕΡΑ !!!

    Thanks for the reply,

    the first formula with a little improve (i had to deal with the off in a cell) works fine =if(and(isnumber(c5);isnumber(d5));(c5>d5)*median(0;d5-1/4;2/3)+max(0;min(11/12;d5+(c5>d5))-max(1/4;c5)))*24

    but the second does not seem to work!

    Ι post again the sample workbook to confirmation of the above.

    any further help would be appriciate

    Thanks in advance
    Attached Files Attached Files

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: separate night from day hours

    Καλησπέρα.

    I don't understand which could be the problem for the second formula.

    Pls, take a look to the example.

    Από που είσαι πατριώτη; Πως σε λένε;
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-12-2013
    Location
    greece
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: separate night from day hours

    Thanks the problem is solved!!!!

    ΑΠΟ ΚΡΗΤΗ ΠΑΤΡΙΩΤΗ!!!! ΝΑΣΑΙ ΚΑΛΑ

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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