+ Reply to Thread
Results 1 to 5 of 5

Timesheet Total hours error

  1. #1
    Registered User
    Join Date
    05-10-2009
    Location
    london,england
    MS-Off Ver
    Excel 2003
    Posts
    18

    Timesheet Total hours error

    I am working on timesheet. I am using formula =((F17-E17+(F17<E17))-(I17-H17+(I17<H17)))*24. to calculate total hours

    I have 4 coloums i.e E = TIme in , F= Time out and H= Break in , I= Break out. I want formula show total hours as "0" or blank if employee forget to put TIME IN or TIME OUT or BREAK IN or BREAK OUT. Currently total hours shows sometime 23:00 hrs or sometime negative value if employee forget to put time in any of the above mentioned columns.

    Also I am using macro button as input time i.e

    Button1 = Clock IN
    Button2 = Clock out
    Button3 = Break IN
    Button4 = Break OUt

    Is there any way to disable these macro buttons until next day once employee clicked any button.

    Appreciate if somebody help me to solve these problems.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Timesheet Total hours error

    In terms of formula:

    =IF(COUNT(E17:F17,H17:I17)=4,24*(MOD(F17-E17,1)-MOD(I17-H17,1)),0)

  3. #3
    Registered User
    Join Date
    05-10-2009
    Location
    london,england
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Timesheet Total hours error

    Ty for prompt reply.

    Your formula solved my problem i.e show "0" if data missing in 4 columns i.e E,F,H,I but Now I am getting ##### if all the columns filled with data.

    Thanks again for your help n time.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Timesheet Total hours error

    That would imply that

    a) the result cell is set to Time Format
    b) the result is negative

    that would not make sense on either count ... ie given you're multiplying result by 24 you're showing result in integer terms (ie 10:30 = 10.5) and as such the result cell should be formatted to General / Number rather than Time.

    Can you post a sample ?

  5. #5
    Registered User
    Join Date
    05-10-2009
    Location
    london,england
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Timesheet Total hours error

    Great - Wonderfull job

    Any solution for the next part of my question?

    Thanks for ur time n effort.

+ 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