+ Reply to Thread
Results 1 to 14 of 14

hours worked (for night workers)

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    hours worked (for night workers)

    Hi All,
    I'm new the excel so please be patient, I have created a worksheet that shows the start and finish by worker, I am trying to establish what hours each worker has done per day, this is ok when a worker is on a day shift (eg 11:30 to 23:30) I can just minus the later from the first.. My problem is when a worker has done a night shift and is working (23:30 to 05:30) I don't use date just time example i imput as displayed in the thread, not 25/06/2012 23:30 to 26/06/2012 05:30, i hope that someone can help me as i can't be using the format mentioned as a manual entry everytime.......

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: hours worked (for night workers)

    Assume the start and end time are in cells A1 and B1

    Try This:

    =IF(B1<A1,24-A1+B1,B1-A1)

    Kirk

    If this solves your problem, change the title to [SOLVED] and click on the star on the bottom of my message
    Click on star (*) below if this helps

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: hours worked (for night workers)

    This should work
    =IF(B1<A1,(1-A1)+B1,B1-A1)

    where A1 is start time and B1 is end time, both entered without dates as you've specified
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: hours worked (for night workers)

    Simply use
    Please Login or Register  to view this content.
    and format as required

  5. #5
    Registered User
    Join Date
    06-21-2012
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: hours worked (for night workers)

    Hi all Thanks for the help but i'm afriad none of these have solved my issue, it may be me and in that case i can't say how sorry i am, i have included a snapshot of the worksheet in hope that this help's

    A B C D E F G
    1DRIVERS NAME COMPANY CAT DAYS SUN 24TH
    2 NIGHTS start timeFinish time
    3Aldred Peter ASDA C+E NIGHTS 23:30 05:30
    4Bissett Paul ASDA C+E DAYS 08:00 18:30 =F4-E4

    the sum is to go in Column G

    thanks again for help thus far..

  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: hours worked (for night workers)

    Ηι

    Instead of a picture(that you did not uploaded!), why don't you upload a small sample workbook?
    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.

  7. #7
    Registered User
    Join Date
    06-21-2012
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: hours worked (for night workers)

    sorry i didn't know how to do it?

  8. #8
    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: hours worked (for night workers)

    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

  9. #9
    Registered User
    Join Date
    06-21-2012
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: hours worked (for night workers)

    test 101.xlsx

    thank you

  10. #10
    Registered User
    Join Date
    06-26-2012
    Location
    Limerick, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    52

    Re: hours worked (for night workers)

    =mod(A1-B1,1)

  11. #11
    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: hours worked (for night workers)

    I did not check the other suggestions, but Pepe's formula, works great..

    Why do you say that does not works?
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    06-21-2012
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: hours worked (for night workers)

    this does work sorry i had a format issue AND a brain meltdown..... thank you all so much

    would you also be able to suggest how to remove 45 minutes off every shift ?? just hoping

  13. #13
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: hours worked (for night workers)

    =MOD(end_time-start_time,1)-0.03125

  14. #14
    Registered User
    Join Date
    06-21-2012
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: hours worked (for night workers)

    Thanks Everyone

    happy Boss = Pay increase

+ 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