+ Reply to Thread
Results 1 to 6 of 6

Difference of the times

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    bangalore, india
    MS-Off Ver
    Excel 2010
    Posts
    1

    Post Difference of the times

    I have text as below in A2
    27-Jun-2019 10:00,18-Feb-2019 13:30,18-Feb-2019 09:30,18-Feb-2019 09:10
    and I have below text in B2
    27-Jun-2019 10:15,18-Feb-2019 15:30,18-Feb-2019 09:45,18-Feb-2019 09:45

    I want to get in C2 as B2-A2 (time2-time1 ), considering the 4 times separately and final value to be addition of 4 time differences .

    How to do this ?
    Attached Files Attached Files
    Last edited by jambar66; 08-02-2020 at 12:11 PM. Reason: need to attach a file

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Difference of the times

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,256

    Re: Difference of the times

    Split each cell in 4 different cells ('data' 'text to columns') then you can easy substract and add those 4 times.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,256

    Re: Difference of the times

    Please Login or Register  to view this content.
    Or this long formula

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,401

    Re: Difference of the times

    You could use this UDF (user defined function) which returns a #VALUE! error if the number of dates between the two cells is not the same...
    Please Login or Register  to view this content.
    HOW TO INSTALL UDFs
    ------------------------------------
    If you are new to UDFs, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. You can now use SumTimeDiff just like it was a built-in Excel function. For example,

    =SumTimeDiff(A1,B1)

    If you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,409

    Re: Difference of the times

    Another approach:

    Please Login or Register  to view this content.
    yield "3:05"
    *24 if you want it to be "3.08"
    Quang PT

+ 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] difference in 2 times but:-
    By Russski in forum Excel General
    Replies: 5
    Last Post: 04-14-2016, 08:47 AM
  2. [SOLVED] Difference between two times - avoiding ###### for times that span midnight
    By Abarency in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2015, 01:15 PM
  3. [SOLVED] Difference between times
    By Berna11 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-05-2013, 08:39 AM
  4. difference between two times
    By Reign in forum Excel General
    Replies: 6
    Last Post: 02-12-2012, 09:12 PM
  5. Difference between two times
    By sconway in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-24-2011, 02:05 PM
  6. Difference between two times - thank you!!
    By Lynneth in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-10-2008, 03:24 PM
  7. Difference in Times
    By bcbjork in forum Excel General
    Replies: 6
    Last Post: 08-27-2005, 10:42 AM

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