+ Reply to Thread
Results 1 to 7 of 7

Comparison of date and time

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    5

    Comparison of date and time

    I have four cells where cell1 is in date format dd/mm/yyyy, cell2 is in hh:mm:ss , cell3 is in dd/mm/yyyy hh:mm:ss. Cell4 should dynamically produce a result based on the following condition:

    if cell1+cell2 is less than cell3 then display message1 else message2.
    How should i put this in a formula

    Thankyou.

  2. #2
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Comparison of date and time

    =IF(A1+B1<C1,"Message1","Message2")

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Comparison of date and time

    Fill the cel_# with the cell reference.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    11-15-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Comparison of date and time

    M getting format error with this formula.

  5. #5
    Registered User
    Join Date
    11-15-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Comparison of date and time

    I applied this formula...
    =IF((DATE(YEAR(M2),MONTH(M2),DAY(M2)))<(DATE(YEAR(P2),MONTH(P2),DAY(P2))),"No",IF(AND(DATE(T:T(M2),MONTH(M2),DAY(M2))=(DATE(YEAR(P2),MONTH(P2),DAY(P2))),(N2)<(TIME(HOUR(P2),MINUTE(P2),SECOND(P2)))),"No","Yes"))
    where m2,n2 and p2 are cell1,cell2 and cell3 respectively.

    Thanks so much for your help.

  6. #6
    Registered User
    Join Date
    11-15-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Comparison of date and time

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

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Comparison of date and time

    Have you got the result or not?

+ 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