+ Reply to Thread
Results 1 to 9 of 9

TIME formula please help!

  1. #1
    Registered User
    Join Date
    11-06-2016
    Location
    Vancouver
    MS-Off Ver
    Windows. Latest.
    Posts
    42

    TIME formula please help!

    I want to calculate work hours, but separate hours over 8 (for overtime, obviously) to be put into a separate cell.
    But I also need to account for -30 minutes for break time.

    And, the -30 is only accounted for of shifts of 6 hours or more.

    so:

    8 hour shift = 7.5 hours

    10 hour shift = |7.5 hours| -- |2.5 hours ot|

    And I'm going to have that calculation running for a weeks' pay period, in this case 14 cells.

    So far I can find the difference with

    =HOUR(A2-A1)

    Thank you so much for the help.

  2. #2
    Registered User
    Join Date
    09-09-2013
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: TIME formula please help!

    Hi
    it's better to send the file! with example on it!
    thanks
    Islam = Peace
    Shia = Peace
    Iran = Peace

  3. #3
    Registered User
    Join Date
    11-06-2016
    Location
    Vancouver
    MS-Off Ver
    Windows. Latest.
    Posts
    42

    Re: TIME formula please help!

    All projected cells will add the differences (aka the hours worked) with the exception that -30 minutes be deducted from that days' difference (hours worked)
    if hours worked that day exceed 6 .

    A total (or running total in case of actual) to be calculated and presented for week-end and month-end.

    As well as consideration taken that any overtime (hours worked over 8) to be calculated and presented in a separate cell.
    Presented for both; week-end and month-end.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-09-2013
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: TIME formula please help!

    Hi
    sorry i couldn't understand your question...could you tell an example on the sample file!?
    thanks

  5. #5
    Registered User
    Join Date
    11-06-2016
    Location
    Vancouver
    MS-Off Ver
    Windows. Latest.
    Posts
    42

    Re: TIME formula please help!

    Ok let me try to ask this again, as I've revised it to probably work more easily now
    that the clock in and clock out times have been given their own cell.

    I know how to find the difference between the times (aka, hours worked) with the =HOUR() function.

    But I'd like the formula to subtract 30 minutes from the hours worked if the hours worked equals 6 or more.

    And then I'd like it to calculate into a separate cell anything overtime.



    So: =HOUR(C6-C5) =7 (but because it's over 6 i want to subtract 30 minutes) =6.5
    So lets assume that for all Projected times.

    Now for Actual

    Lets say if =HOUR(C13-C12) =10 (then, in two separate cells) RegularTime: =7.5 OverTime: =2


    Is that making more sense ?
    Thanks for your help, again!


    EDIT: I just realized that I can't use =HOUR to find the hours worked and have them added into each other for a "week total" as it won't let me calculate more than 24 'hours'
    Attached Files Attached Files
    Last edited by BeHereALot; 11-26-2016 at 05:29 PM.

  6. #6
    Registered User
    Join Date
    09-09-2013
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: TIME formula please help!

    Hi
    Sorry i asked a lot...
    Check it
    specially the false part!
    =HOUR(C6-C5) =7 (but because it's over 6 i want to subtract 30 minutes) =6.5
    So lets assume that for all Projected times.
    Please Login or Register  to view this content.
    Last edited by rahi_feri; 11-26-2016 at 07:21 PM.

  7. #7
    Registered User
    Join Date
    09-09-2013
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: TIME formula please help!

    Lets say if =HOUR(C13-C12) =10 (then, in two separate cells) RegularTime: =7.5 OverTime: =2
    First you said 2.5 and now 2 so decide yourself!
    For example
    c12=07:00:00
    c13=17:00:00
    then
    In d2:
    Please Login or Register  to view this content.
    = 7.5
    In d3:
    Please Login or Register  to view this content.
    = 2.5
    Last edited by rahi_feri; 11-26-2016 at 07:20 PM.

  8. #8
    Registered User
    Join Date
    09-09-2013
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: TIME formula please help!

    it won't let me calculate more than 24 'hours'
    when the result of summing the time is more then 24 hours use this format
    Please Login or Register  to view this content.
    and write it in custom format!

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

    Re: TIME formula please help!

    1 represents 1 day therefore the fraction 1/3 represents 8 hours of 1 day and 1/48 represents 1/2 hour. The results in the following calculations are in hours and minutes formatted as h:mm.

    B
    C
    D
    E
    11
    Not crossing midnight
    12
    Start
    7:00 AM
    13
    End
    11:00 PM
    16:00
    hours total
    14
    Reg Time
    7:30
    =IF(C13-C12>1/3,1/3-1/48,C13-C12)
    15
    Overtime
    8:00
    =IF(C13-C12>1/3,C13-C12-C14-1/48,"")



    G
    H
    I
    J
    11
    Crossing Midnight
    12
    Start
    7:00 AM
    13
    End
    1:00 AM
    18:00
    hours total
    14
    Reg Time
    7:30
    =IF(H13-H12+(H12>H13)>1/3,1/3-1/48,H13-H12)
    15
    Overtime
    10:00
    =IF(H13-H12+(H12>H13)>1/3,H13-H12+(H12>H13)-H14-1/48,"")
    Last edited by newdoverman; 11-26-2016 at 08:50 PM.
    <---------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

+ 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] Formula to fill C5 with a time that makes J5 equal 8 hours based on time put into B5
    By possumbarnes in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-26-2015, 10:08 PM
  2. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  3. Replies: 5
    Last Post: 04-18-2013, 11:31 AM
  4. Formatting a total time entry and building a cumulative time formula.
    By TMc10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2012, 10:26 PM
  5. 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
  6. Replies: 2
    Last Post: 04-27-2011, 08:21 AM
  7. Replies: 1
    Last Post: 03-27-2006, 01:10 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