+ Reply to Thread
Results 1 to 11 of 11

Compute hours and minutes

  1. #1
    Registered User
    Join Date
    05-10-2017
    Location
    Riverside CA
    MS-Off Ver
    2016 Home
    Posts
    21

    Compute hours and minutes

    cell i16 contains 7:55 PM
    cell g16 contains 5:35 PM

    What formula will compute the number of hours and minutes (formatted as "2 hrs 20 mins") between the times in i16 and c16?
    Last edited by gcotterl; 10-14-2017 at 03:08 PM.

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

    Re: Compute hours and minutes

    =$i16-$g16

    format as required
    Last edited by daddylonglegs; 10-14-2017 at 03:14 PM.
    Audere est facere

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Compute hours and minutes

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Registered User
    Join Date
    05-10-2017
    Location
    Riverside CA
    MS-Off Ver
    2016 Home
    Posts
    21

    Re: Compute hours and minutes

    daddylonglegs: The result is 2:20 AM not 2 hrs 20 mins

  5. #5
    Registered User
    Join Date
    05-10-2017
    Location
    Riverside CA
    MS-Off Ver
    2016 Home
    Posts
    21

    Re: Compute hours and minutes

    Jacc: The result is #VALUE!

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Compute hours and minutes

    Quote Originally Posted by gcotterl View Post
    daddylonglegs: The result is 2:20 AM not 2 hrs 20 mins
    That was the "format as required" part:

    A
    B
    1
    7:55 PM
    2
    5:35 PM
    3
    2 hrs 20 mins
    A3: =A1-A2
    4
    Format of A3: h" hrs "m" mins"
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    05-10-2017
    Location
    Riverside CA
    MS-Off Ver
    2016 Home
    Posts
    21

    Re: Compute hours and minutes

    shg: A# contains:
    ###############################################################################################################################################################################################################################################################

  8. #8
    Registered User
    Join Date
    10-14-2017
    Location
    Guatemala
    MS-Off Ver
    2016
    Posts
    9

    Thumbs up Re: Compute hours and minutes

    try:

    =TEXT(I16-G16,"h:mm")

    that should result in 2:20

    however, it will only be a result in text. if your intention is to use it for calculation purposes later on, you would need to:

    enter the formula =i16-g16 and:

    press control+1

    choose the number tab, go to "TIME"

    and choose an option without the am/pm on it.

    that should work.
    Last edited by LBUG; 10-14-2017 at 04:27 PM.

  9. #9
    Registered User
    Join Date
    05-10-2017
    Location
    Riverside CA
    MS-Off Ver
    2016 Home
    Posts
    21

    Re: Compute hours and minutes

    thanks. The result is 2:20

  10. #10
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Compute hours and minutes

    This is why we usually request people to post a sample workbook.
    I assumed your data was strings, not numerical value formatted as time.

  11. #11
    Registered User
    Join Date
    10-14-2017
    Location
    Guatemala
    MS-Off Ver
    2016
    Posts
    9

    Re: Compute hours and minutes

    gcotterl - Awesome!

+ 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. Replies: 3
    Last Post: 09-21-2015, 01:56 PM
  2. Excel 2007 : Convert number of minutes to hours and minutes
    By MikeFromIndy in forum Excel General
    Replies: 30
    Last Post: 06-05-2015, 08:10 AM
  3. Replies: 1
    Last Post: 08-08-2013, 09:21 AM
  4. Replies: 13
    Last Post: 05-03-2013, 08:42 PM
  5. [SOLVED] converting Days Hours & minutes into just minutes in excel
    By Six Sigma Blackbelt in forum Excel General
    Replies: 5
    Last Post: 04-28-2006, 04:45 PM
  6. Replies: 2
    Last Post: 11-05-2005, 12:25 PM
  7. add hours & minutes to other hours & minutes to receive total hou.
    By Wes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2005, 08:06 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