+ Reply to Thread
Results 1 to 2 of 2

TImeIn-TimeOut-TimeIn-TimeOut-HoursWorked

  1. #1
    ChefBoiRD
    Guest

    TImeIn-TimeOut-TimeIn-TimeOut-HoursWorked


    This worked for me for a 5 column Time Sheet (Line 7)... providing that
    the center time out/in is used for lunch or left blank if no lunch is
    taken....is there a better array out there?

    =IF(H7=I7,((((HOUR(J7)*60)+(MINUTE(J7)))-((HOUR(G7)*60)+(MINUTE(G7)))))/60,((((HOUR(J7)*60)+(MINUTE(J7)))+((HOUR(H7)*60)+(MINUTE(H7)))-((HOUR(I7)*60)+(MINUTE(I7)))-((HOUR(G7)*60)+(MINUTE(G7))))/60))

    I used other functions to set dates/times and hour totals. See the
    attachment for the layout.


    +-------------------------------------------------------------------+
    |Filename: Timesheet.jpg |
    |Download: http://www.excelbanter.com/attachment.php?attachmentid=32|
    +-------------------------------------------------------------------+

    --
    ChefBoiRD

  2. #2
    Bob Phillips
    Guest

    Re: TImeIn-TimeOut-TimeIn-TimeOut-HoursWorked

    Shorter and simpler at the very least <vbg>

    =((J7-G7)-IF(AND(H7<>"",I7<>""),I7-H7,0))*24

    --
    HTH

    Bob Phillips

    "ChefBoiRD" <[email protected]> wrote in message
    news:[email protected]...
    >
    > This worked for me for a 5 column Time Sheet (Line 7)... providing that
    > the center time out/in is used for lunch or left blank if no lunch is
    > taken....is there a better array out there?
    >
    >

    =IF(H7=I7,((((HOUR(J7)*60)+(MINUTE(J7)))-((HOUR(G7)*60)+(MINUTE(G7)))))/60,(
    (((HOUR(J7)*60)+(MINUTE(J7)))+((HOUR(H7)*60)+(MINUTE(H7)))-((HOUR(I7)*60)+(M
    INUTE(I7)))-((HOUR(G7)*60)+(MINUTE(G7))))/60))
    >
    > I used other functions to set dates/times and hour totals. See the
    > attachment for the layout.
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: Timesheet.jpg |
    > |Download: http://www.excelbanter.com/attachment.php?attachmentid=32|
    > +-------------------------------------------------------------------+
    >
    > --
    > ChefBoiRD




+ 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