+ Reply to Thread
Results 1 to 5 of 5

Military Time to Calculate Hours worked after 7 pm

  1. #1
    Registered User
    Join Date
    03-29-2014
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Military Time to Calculate Hours worked after 7 pm

    Hi All,

    This is my first post so I hope I can make my problem clear.

    I am using Military Time format 00\:00 to calculate actual hours worked.

    MONDAY
    14-May-18
    Start Finish Hours worked Calculate Hours worked past 7pm "19:00"
    less 1 hr break

    a 11:24 20:00 7.6 1
    b 08:00 16:36 7.6 -2.4
    c 12:24 21:00 7.6 2

    The formula for calculating hours worked past 7pm is =IF(TEXT(G9*24>19,"00\:00"),(TEXT(G9,"00\:00")*24-19),(TEXT(0,"00\:00")))
    Times for a: and c: are correct, however b: should be 0 as the finish time is 4:36pm "16:36" and not -2.4
    How to I get the formula to read if False as b is to return a 0 value?
    Attached Files Attached Files

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Military Time to Calculate Hours worked after 7 pm

    All you are doing with the 00/:00 is to present the number 1636 with a : between 16and 36 as if it was a thousand separator, when you do 1636*24 the outcome is 39264 so the outcome is always over 19 because even time 1minute past midnight will pass as 1*24=24>19 Since you do not have real time values the *24 does not work. that only works on true time (fraction of 1)

    so you need to change your test and formula to

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Roel Jongman; 05-29-2018 at 05:53 AM.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Military Time to Calculate Hours worked after 7 pm

    Try:

    =IF(G8>1900,TEXT(G8,"00\:00")*24-19,0)

  4. #4
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Military Time to Calculate Hours worked after 7 pm

    So I had another look at your formula, I now realize I took a different approach to determine under or over 7pm. but it is possible to do it the way you set it up, the formula just needs to be shifted around a bit..

    this one will work too

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    so basicly there are more ways to get to where you want to be.
    as a third option al that reformatting in the formula is not needed. militairy time is pronounced and written as 19 hundred hours. so dividing your outcomes by 100 will give also the right result

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    since you are out the get the hours worked as a number the last one might be the most logical
    Last edited by Roel Jongman; 05-29-2018 at 06:05 AM.

  5. #5
    Registered User
    Join Date
    03-29-2014
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Military Time to Calculate Hours worked after 7 pm

    Thank you , that was very helpful Roel.

+ 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. Using IF function to calculate hours worked - non military time
    By Kanne26 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-07-2015, 11:11 AM
  2. Calculating percent of hours worked by shift using military time
    By seanpod in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-24-2015, 01:23 PM
  3. [SOLVED] Looking for formula help finding total hours worked in military time
    By Mic4220 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-08-2015, 02:42 PM
  4. [SOLVED] [SOLVED] Calculate time worked inside Regular Hours and Over Time
    By myxamhatosis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-07-2015, 09:16 PM
  5. Formula tp ca;culate hours worked using military hours and standard minutes
    By Vicki Steffen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-24-2014, 03:03 PM
  6. Replies: 4
    Last Post: 02-12-2013, 07:01 AM
  7. Replies: 2
    Last Post: 02-11-2013, 02:26 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