+ Reply to Thread
Results 1 to 8 of 8

Difference between times

  1. #1
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Difference between times

    Hello everyone, I need your help to find a way to make a difference between times and compare it with other time.
    In the example you understand what I want to achieve
    Thank you all for the help
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Difference between times

    Please Login or Register  to view this content.
    Hi Berna11, i make it as same format. So i can compare.

    edit: need consider hours.
    Last edited by wenqq3; 08-05-2013 at 05:33 AM.
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,684

    Re: Difference between times

    try
    =IF(TIME(HOUR(G1),MINUTE(G1),SECOND(G1))=TIME(HOUR(D5),MINUTE(D5),SECOND(D5)),"OK","NO")
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Difference between times

    B5 and C5 are differant formatted, then the other cells.

    See the attached file, with the correct result.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Difference between times

    Thank you for the answers, but not there yet.
    I send you a more complete file to understand better.
    The cells containing time are formatted with h.mm
    But the formula does not give me the desired result.
    In column G in yellow what should come from the formula in column D.
    thanks again
    Attached Files Attached Files

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,684

    Re: Difference between times

    as posted have you tried my formula using Time

    Also your last example - row 9 = G2 so should that be CONTROLLO
    since $C9-$B9=$G$2

    =IF(time(hour($C5-$B5),minute($C5-$B5),second($C5-$B5))<=0,"VERIFICA ORARIO",IF(time(hour($C5-$B5),minute($C5-$B5),second($C5-$B5)) >$G$1,"INTERVALLO TROPPO LUNGO",IF(time(hour($C5-$B5),minute($C5-$B5),second($C5-$B5))=$G$1,"COMPLETA",IF(time(hour($C5-$B5),minute($C5-$B5),second($C5-$B5))=$G$2,"CONTROLLO","????"))))

  7. #7
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Difference between times

    Please Login or Register  to view this content.
    Modified my previous code, you can try this as well.

  8. #8
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Difference between times

    Thanks I have resolved to work Wenqq3 and Etaf
    I had a little problem of translation before.

+ 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. difference between two times
    By Reign in forum Excel General
    Replies: 6
    Last Post: 02-12-2012, 09:12 PM
  2. Difference between two times
    By sconway in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-24-2011, 02:05 PM
  3. How to get difference between two times
    By Climaxgp in forum Excel General
    Replies: 4
    Last Post: 11-03-2009, 08:14 AM
  4. Difference between two times - thank you!!
    By Lynneth in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-10-2008, 03:24 PM
  5. Difference in Times
    By bcbjork in forum Excel General
    Replies: 6
    Last Post: 08-27-2005, 10:42 AM

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