+ Reply to Thread
Results 1 to 2 of 2

Time sheet

  1. #1
    Registered User
    Join Date
    10-19-2009
    Location
    tyne & wear
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    37

    Time sheet

    Hi All
    Worked out how to total times worked for the week but need to deduct lunch breaks 30 minutes each day but ignore blanks (not to deduct the 30 minutes when blank) & ignore cells with text in
    Please see sheet attached
    text in drop down menus
    When text entered total cell shows "Value#"
    at the moment I get in totals cell 59.30 When I m after should be 56:00
    Attached Files Attached Files
    Last edited by hugrl; 12-05-2010 at 10:39 AM.

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    Re: Time sheet

    Hi,

    You might try the following formula in P5 (and copy it down). It won't handle every possible thing you can throw at it, but it should handle a good number of them.

    PHP Code: 
    =SUMIF($B$4:$O$4,$O$4,$B5:$O5)-SUMIF($B$4:$O$4,$N$4,$B5:$O5)-COUNT($B5:$O5)/2*(30/(60*24)) 
    The first two formulas account for the standard time calculation you already had.

    The third formula -- COUNT($B5:$O5)/2*(30/(60*24)) -- functions by counting the numbers in the row and dividing by two to determine the number of days. It then multiplies that number by 30 minutes (divided by 60*24 to convert it to days, which is the standard Excel method to store times). You will run into issues if you have odd numbers of times.

    S
    Last edited by Maistrye; 12-03-2010 at 10:56 PM. Reason: Added details about the COUNT() portion.
    ------------------------------------------------------------------------------------------
    If you need no more help on the current problem, please mark it as "Solved". It saves time
    as many of us will look at threads if they are not marked as "Solved".

    The instructions on how to do this are found in the Forum Rules thread that is at top of every forum.
    (Currently you'll have to look at point #9.)
    ------------------------------------------------------------------------------------------

+ 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