+ Reply to Thread
Results 1 to 6 of 6

Calculating time worked based on times in and out

  1. #1
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    402

    Calculating time worked based on times in and out

    Hello,

    Attached I have a spreadsheet that has a start time, lunch out, lunch in, end time.

    I need help creating a formula for the total time worked.

    Thanks for any help with this formula.

    Nick
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Calculating time worked based on times in and out

    Nick

    Try this formula,

    =IF(E2<B2,E2+1-B2, E2-B2)-(D2-C2)

    and format the cell as [mm] to display minutes.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Calculating time worked based on times in and out

    If you want the result in hh:mm:ss format, you can put this formula in F2:

    =E2-B2-(D2-C2)+(B2>E2)

    If you want it as decimal hours, you can multiply that whole formula by 24, i.e.:

    =(E2-B2-(D2-C2)+(B2>E2))*24

    and format the cell as General.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    402

    Re: Calculating time worked based on times in and out

    Thanks Pete_UK, "=(E2-B2-(D2-C2)+(B2>E2))*24" worked.

    "=E2-B2-(D2-C2)+(B2>E2)" gave me a result of .34 hours, but if I use the second option it shows 8.15

  5. #5
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Calculating time worked based on times in and out

    Your result of 0.34 is not hours, it's days.
    You need to apply the hh:mm:ss format (or just hh:mm) to your "Hours worked" column as noted in the first line of Pete's post #3 above.

  6. #6
    Forum Contributor
    Join Date
    07-10-2012
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    402

    Re: Calculating time worked based on times in and out

    Thank you PMGeoffW283, AMPete_UK & AMNorie!

+ 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. I need some help with calculating hours worked during various shift times
    By Minxy01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-27-2015, 04:24 PM
  2. Help Please : Formula for calculating hours worked for various start times
    By makidoja in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-18-2014, 11:18 AM
  3. Replies: 2
    Last Post: 02-24-2012, 12:36 PM
  4. Calculating basic hours worked, between a time range and premium hours worked
    By RoyLittle0 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-07-2012, 06:59 AM
  5. Replies: 0
    Last Post: 01-05-2012, 06:23 AM
  6. Calculating Time Owed based on Time Worked
    By Tony Vargo in forum Excel General
    Replies: 9
    Last Post: 06-23-2009, 11:30 AM
  7. Calculating Pay based on time of day hrs worked
    By scarlett1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-06-2005, 06:45 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