+ Reply to Thread
Results 1 to 7 of 7

Formula to calculate military time into hrs

  1. #1
    Ron - Matrix Investigations
    Guest

    Formula to calculate military time into hrs

    ie; 2300-0015 1.5 hrs

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Is this in one cell or two?

    Ideally, if you enter times with a colon i.e. in A1 23:00 and in B1 00:15 then the formula for showing the difference in time is

    =B1-A1+(A1>B1)

    format as time

    this will give you

    01:15

    or if you want 1.25

    =(B1-A1+(A1>B1))*24

    format as number

  3. #3
    Toppers
    Guest

    RE: Formula to calculate military time into hrs

    Ron,

    A1=23:00, B1=00:15 then in C1 (all entered with format hh:mm):-

    =(B1-A1)+(B1<A1)*24

    HTH

    "Ron - Matrix Investigations" wrote:

    > ie; 2300-0015 1.5 hrs


  4. #4
    Ron - Matrix Investigations
    Guest

    Re: Formula to calculate military time into hrs

    Thanks, I really appreciate the help.

    Ron
    805-529-8300

    "daddylonglegs" wrote:

    >
    > Is this in one cell or two?
    >
    > Ideally, if you enter times with a colon i.e. in A1 23:00 and in B1
    > 00:15 then the formula for showing the difference in time is
    >
    > =B1-A1+(A1>B1)
    >
    > format as time
    >
    > this will give you
    >
    > 01:15
    >
    > or if you want 1.25
    >
    > =(B1-A1+(A1>B1))*24
    >
    > format as number
    >
    >
    > --
    > daddylonglegs
    > ------------------------------------------------------------------------
    > daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
    > View this thread: http://www.excelforum.com/showthread...hreadid=508391
    >
    >


  5. #5
    Ron - Matrix Investigations
    Guest

    RE: Formula to calculate military time into hrs

    Thanks, I really appreciate the help

    Ron
    805-529-8300

    "Toppers" wrote:

    > Ron,
    >
    > A1=23:00, B1=00:15 then in C1 (all entered with format hh:mm):-
    >
    > =(B1-A1)+(B1<A1)*24
    >
    > HTH
    >
    > "Ron - Matrix Investigations" wrote:
    >
    > > ie; 2300-0015 1.5 hrs


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

    this formula doesn't work

    =(B1-A1)+(B1<A1)*24


    you need the parentheses arranged differently - see my formula above

  7. #7
    Tom Ogilvy
    Guest

    Re: Formula to calculate military time into hrs

    A simple alternative

    A1: 23:00
    B1: 00:15
    =MOD(B1-A1,1)

    in general
    =Mod(endtime-starttime,1)


    format the cell as time
    --
    Regards,
    Tom Ogilvy

    "Ron - Matrix Investigations"
    <[email protected]> wrote in message
    news:[email protected]...
    > Thanks, I really appreciate the help.
    >
    > Ron
    > 805-529-8300
    >
    > "daddylonglegs" wrote:
    >
    > >
    > > Is this in one cell or two?
    > >
    > > Ideally, if you enter times with a colon i.e. in A1 23:00 and in B1
    > > 00:15 then the formula for showing the difference in time is
    > >
    > > =B1-A1+(A1>B1)
    > >
    > > format as time
    > >
    > > this will give you
    > >
    > > 01:15
    > >
    > > or if you want 1.25
    > >
    > > =(B1-A1+(A1>B1))*24
    > >
    > > format as number
    > >
    > >
    > > --
    > > daddylonglegs
    > > ------------------------------------------------------------------------
    > > daddylonglegs's Profile:

    http://www.excelforum.com/member.php...o&userid=30486
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=508391
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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