+ Reply to Thread
Results 1 to 7 of 7

Subtracting Time - Is this possible?

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Subtracting Time - Is this possible?

    B:4 is the start time 12:40 PM

    C:4 is the end time 2:51 PM

    I'm looking for a function that will display in D:4 the time difference, i.e. 2 hours 11 minutes or 2:11

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Subtracting Time - Is this possible?

    Hi,

    How about

    =C4-B4+IF(B4>C4,24)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    82

    Re: Subtracting Time - Is this possible?

    Hello,

    If your cells are formatted as Custom "h:mm AM/PM" you can just C4-B4.
    And after that format as Custom "hh:mm

  4. #4
    Registered User
    Join Date
    09-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Subtracting Time - Is this possible?

    I think this will work, thanks!

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,697

    Re: Subtracting Time - Is this possible?

    Quote Originally Posted by Richard Buttrey View Post
    =C4-B4+IF(B4>C4,24)
    If C4 and B4 are time values then that formula will potentially give you an incorrect result beacuse 24 represents 24 days, e.g. B4 = 22:00, C4 = 02:00, custom format result cell as [h]:mm and you get 556:00, 24 should be 1
    Audere est facere

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Subtracting Time - Is this possible?

    May be

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


    Format cell as [h]:mm

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Subtracting Time - Is this possible?

    @ddl.

    Thanks for the correction. Completely missed that being fixated on 24 hours in a day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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