+ Reply to Thread
Results 1 to 8 of 8

calculating time

  1. #1
    Registered User
    Join Date
    09-03-2013
    Location
    Reading
    MS-Off Ver
    Excel 2010
    Posts
    25

    calculating time

    Hi

    I have a timesheet with different shifts workers have worked.

    I have a time in and time out, lunch in and lunch out. I want to calculate the number of hours which fall between 8:00 till 18:30 and the number of hours which fall between 18:30 till 8:00. I need to minus the lunch in and out from this figure. I charge the client different rates for those 2 times so I just want to calculate the number of hours so that i can show my client the number of units that fell under those shifts.

    Can someone help me please?

    Thanks

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: calculating time

    Do some of your shifts pass midnight or are they all on one day?
    Audere est facere

  3. #3
    Registered User
    Join Date
    09-03-2013
    Location
    Reading
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: calculating time

    They are all in one day, thanks.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: calculating time

    Quote Originally Posted by rjassal82 View Post
    I have a time in and time out, lunch in and lunch out.
    let's assume those are in A2, B2, C2 and D2 respectively then you can use this formula in F2 to get the time worked between 08:00 and 18:30 (assuming lunch is always within those hours)

    =MIN(B2,"18:30")-MAX(A2,"8:00")+C2-D2

    then in G2 for the rest of the hours:

    =B2-A2+C2-D2-F2

  5. #5
    Registered User
    Join Date
    09-03-2013
    Location
    Reading
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: calculating time

    Thanks, how do I get it to enter a zero if no time was entered?

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: calculating time

    Try adding an IF function to the first formula like this:

    =IF(A2="",0,MIN(B2,"18:30")-MAX(A2,"8:00")+C2-D2)

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: calculating time

    This is a timesheet that I have "played around" with for a while. It might have features that you can make use of.

    The protected areas are protected without password.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Registered User
    Join Date
    09-03-2013
    Location
    Reading
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: calculating time

    thank you very much

+ 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. Calculating staff roster time to hours, depending on time worked.
    By cookiet in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-16-2013, 10:25 AM
  2. Replies: 3
    Last Post: 11-21-2012, 05:47 AM
  3. Formula for Calculating Paid Time Off for fiscal anniversary date real time
    By 168rockwood in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-07-2012, 04:15 PM
  4. Calculating END time based on start time, breaks, and hours to complete
    By sweedey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2012, 11:29 AM
  5. Excel Formulas for Calculating Straight, Over Time & Double Time in Cost Estimating
    By redhairredhair in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2010, 09:06 PM

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