+ Reply to Thread
Results 1 to 9 of 9

24hour timesheet formula query??

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    kendal, england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Wink 24hour timesheet formula query??

    Hi

    I have a timesheet which is working well apart from in one particular scenario.

    Basically I have created the timesheet in 24 hr format, there is a 'start time' column, 'finish time' column and ' break time taken' column - which then calculate the number of hours worked.

    So this works when the working day does not pass over midnight so the following example calculates with no problems: =IF(D36>0,E36-D36-F36,0)
    COL D - start time is 18:00
    COL E - finish is 23:59
    COL F - break is 00:20

    However if I input the following
    COL D - start time 18:00
    COL E - end time 00:01
    COL F - break 00:20

    the formula does not calculate???

    I have played around with this and what I think I have tried to say is : =IF(E37>0<D37,24-D37-F37,IF(D37>0,E37-D37-F37,0))

    I know this is wrong but I dont how to translate into a workable formula??? can you help???

  2. #2
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: 24hour timesheet formula query??

    Hi, could you post an dummy version? Makes it far easier to help out in such matters.
    If I've been of help, please hit the star

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: 24hour timesheet formula query??

    hi vollis, welcome to the forum. do you have a Start Date & End Date column? you should add that to your time. Let's say Start Date is at H36 and EndDate is at I36. you should have a column to add H36+ D36 and another column to add I36 + E36. you can then use your formula to refer to these 2 columns instead

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    06-13-2012
    Location
    kendal, england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: 24hour timesheet formula query??

    TIMESHEET FORMULA QUERY.jpg

    Hi I have attached an image of the sheet - couldnt see how to attach an actual file ( sorry, new to the forum so acting like a noob!)

    Hope you can access the attachment ok?

  5. #5
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: 24hour timesheet formula query??

    Would this formula in row 37 for example do what you want?

    Obviously change all instances of 37 for the relevant row number in your worksheet.

    =IF(E37<D37,(E37+24)-D37-F37,E37-D37-F37)

  6. #6
    Registered User
    Join Date
    06-13-2012
    Location
    kendal, england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: 24hour timesheet formula query??

    Hi Spencer101

    I have tried this and I think it is almost there - as you can see from the attachment there is no longer an error but the value of hours worked is returned as "0" ??

    Could it be the '24' in the formula throwing out the 24 hour format ???? I am not great at dealing with 24 hr formulas in excel once they surpass a basic level! -

    Any Ideas??TIMESHEET FORMULA QUERY1.jpg


  7. #7
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: 24hour timesheet formula query??

    Have a look at the attachment. Works for me...

    Might need to check the formatting of your cell to ensure it's set to HH:MM
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-13-2012
    Location
    kendal, england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: 24hour timesheet formula query??

    Brilliant !!!!

    Thanks you sooo much for your help - I now have a working sheet.....

  9. #9
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: 24hour timesheet formula query??

    Not a problem. Glad to be of help.

    S.

+ 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