+ Reply to Thread
Results 1 to 5 of 5

Formula Tracking Time In Military Format - Receiving Error

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    Miami, Florida
    MS-Off Ver
    Excel 2007
    Posts
    61

    Formula Tracking Time In Military Format - Receiving Error

    Hello,

    I am using the following formula to calculate time in military format but it is not providing the desired results:

    =(TRUNC(C2/100)-TRUNC(B2/100))/24+(MOD(C2,100)-MOD(B2,100))/1440+IF(C2<B2,1)

    I have attached the file for assistance.

    Thanks a bunch.Start & Stop In Military Time.xlsx

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula Tracking Time In Military Format - Receiving Error

    try
    =MOD(C2-B2,1)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    12-18-2012
    Location
    Miami, Florida
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: Formula Tracking Time In Military Format - Receiving Error

    Hello MartindWilson,

    I added your above function and thought the result on the following should have been 12:03:


    74712 21:48 9:45 11:56

    Can you please take a look at my attached file and advise what I am doing wrong?

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Formula Tracking Time In Military Format - Receiving Error

    Try this in D2 and drag down.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula Tracking Time In Military Format - Receiving Error

    21:48 09:45
    21:48 is 2:12 till midnite

    +9:45

    =11:57

+ 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] Receiving #DIV/0! Error in Basic Formula
    By DDM64 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-10-2013, 11:29 AM
  2. Military time format
    By glenH in forum Excel General
    Replies: 8
    Last Post: 08-06-2012, 06:30 PM
  3. Military Time Format
    By omereis in forum Excel General
    Replies: 2
    Last Post: 11-28-2011, 01:56 PM
  4. Format cell as military time
    By Mike in forum Excel General
    Replies: 15
    Last Post: 07-18-2006, 02:15 PM
  5. [SOLVED] getting military time format within excel
    By dgarrison in forum Excel General
    Replies: 3
    Last Post: 12-25-2005, 06:50 PM

Tags for this Thread

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