+ Reply to Thread
Results 1 to 14 of 14

Timesheet Formula

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    18

    Timesheet Formula

    I need a formula that will sum Log In and Log Out, remove 0.5 hours for lunch, even if less is taken, but also sum any additional lunch time over 0.5. People will be required to take a half an hour lunch, even if they don't take one at all, or take less than 0.5, but we need to subtract from daily hourly totals if they go over.

    I'm currently using =SUM((H4-C4)*24)-0.5, but can't figure out how to always subtract 0.5 hours, but also subtract if the user goes over 0.5 hours.

    Any help would be greatly appretiated. I haven't worked with an Excel formula in five years.

  2. #2
    Forum Contributor
    Join Date
    05-07-2013
    Location
    apple valley ca
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Timesheet Formula

    try this.. it's my version but it should work for you.
    Attached Files Attached Files

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Timesheet Formula

    Hi and welcome to the forum

    You did not mention which cell/column the lunch was in, so lets assume it is in M2. Give this a try...
    =SUM((H4-C4)*24)-max(0.5,M2)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    12-11-2013
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Timesheet Formula

    Thank you for the replies. I think posting a copy of the file is in order. The timesheet will eventually become rather complex, but for right now, I just want to focus on the Login / out and lunch times, and then work on the other metrics I wish to capture. Let me post the file and clarify exactly what I'm looking for. TimesheetTemplate.xlsx

    Please disregard the metrics on the bottom row. I'm not entirely sure which ones we need yet. As noted before, I want to calculate total hours / day, with 0.5 hours taken out, even if less or not taken at all, but also subtract any lunch time over 0.5. Please see the attached file.

    ~We are currently using a different timesheet from one of our 'Special' associates. It gives me a splitting headache just thinking about it.

    Please help and thank you!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Timesheet Formula

    Will the log out time ever be past midnight?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    12-11-2013
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Timesheet Formula

    No. The latest time would be ~9:00 PM US EST. Sometimes people stay late, but never get close to midnight.

    I tried =SUM((H4-C4)*24)-MAX(0.5,(F4-E4)) to no avail.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Timesheet Formula

    Try it like this...

    =IF(COUNT(C4,H4)<2,"",(H4-C4)*24-MAX(0.5,(F4-E4)*24))

    Format as General or Number
    Last edited by Tony Valko; 12-12-2013 at 11:16 AM.

  8. #8
    Registered User
    Join Date
    12-11-2013
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Timesheet Formula

    The output is "FALSE."

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Timesheet Formula

    Works OK for me.

    Here's your file:

    TimesheetTemplate(1).xlsx

  10. #10
    Registered User
    Join Date
    12-11-2013
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Timesheet Formula

    And just to clarify, IN, LUNCH and OUT are columns for scheduled times for refference purposes.

  11. #11
    Registered User
    Join Date
    12-11-2013
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Timesheet Formula

    It works now. Thank you so much!

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Timesheet Formula

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Timesheet Formula

    You're welcome. Thanks for the feedback!

  14. #14
    Registered User
    Join Date
    12-11-2013
    Location
    Cincinnati
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Timesheet Formula

    I see. Added reputation to Tony Valko, and marking [SOLVED].

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] timesheet formula?
    By huhn17 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2013, 07:18 PM
  2. Timesheet formula
    By sforeman in forum Excel General
    Replies: 3
    Last Post: 04-23-2010, 02:24 PM
  3. Excel 2007 : Timesheet Formula
    By Igmaruckfed in forum Excel General
    Replies: 3
    Last Post: 06-07-2009, 03:05 PM
  4. timesheet formula
    By shazeela in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2008, 02:20 PM
  5. Help with a timesheet formula
    By cballard2217 in forum Excel General
    Replies: 3
    Last Post: 12-20-2006, 05:44 AM

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