+ Reply to Thread
Results 1 to 5 of 5

Timesheet

  1. #1
    Registered User
    Join Date
    06-10-2008
    Posts
    20

    Timesheet

    Hi there,

    Usually if I experiment with the formula long enough, I can figure it out, but this one is challenging me.
    I inserted a formula that calculates correctly, if there is a value in the corresponding cells used, but unfortunately, my 'if' statement inbeaded in the formula is giving me an error message "#####" if the corresponding cell is a blank. The 'If' statement calculates on its own with no errors, but not when imbeaded in this formula. Following is the formula used and the attached file for your perusal if necessary.

    Your assistance is very much appreciated.

    =((INT((+IF((C12-B12),(C12-B12)," ")*24+3/60)*4))/4)/24

    Martha
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-18-2008
    Posts
    80
    This should get rid of your error message

    Please Login or Register  to view this content.
    but are you sure something like this isn't more of what you want?

    Please Login or Register  to view this content.
    you also may want to change the format of the cells to [h]:mm
    Last edited by TIPPYS; 06-17-2008 at 10:47 AM.

  3. #3
    Registered User
    Join Date
    06-10-2008
    Posts
    20

    Thanks Tippys

    Formula works! Thanks for the suggestion, but in this department lunch is included in their hours worked, so it is not necessary for me to use those cells in the formula.

    Have a Great Day!

    MR

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    The IF function is redundant in your formula (and revised version). If it ever returned the false part, i.e. " " then you'd get an error because you are then trying to perform calculations on a text value [" "]

    I'd suggest that something like this is neater and more logical:

    =IF(COUNT(B11:C11)=2,FLOOR(C11-B11+"0:03","0:15"),"")

    If B11 and C11 both contain times then you get a result, otherwise a blank. The result is the difference between the 2 times with 3 mins added and rounded down do the previous quarter hour

  5. #5
    Registered User
    Join Date
    06-10-2008
    Posts
    20

    Thumbs up Thanks!

    Your Good! It makes sense.

    Thanks again

    Martha

+ 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