+ Reply to Thread
Results 1 to 4 of 4

IF statement to verify time have returned error output

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    IF statement to verify time have returned error output

    Hi,

    Can anyone please help me to resolve this,

    E16 = 08:45 Cells Format, Custom hh:mm
    H16 = 17:45 Cells Format, Custom hh:mm

    =IF(AND(E16="08:45",H16="17:45"),TRUE,FALSE) have returned False, It should be True.

    Really confused, is it due to syntax error ?

    Please help me

    Regards,
    Farid.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: IF statement to verify time have returned error output

    Give this a shot...
    =AND(E16=TIME(8,45,0),H16=TIME(17,45,0)) (if you only want a TRUE or FALSE answer, you dont need the IF() part)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: IF statement to verify time have returned error output

    Hi FDibbins,

    Thank you very much. I have added reputation to you.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: IF statement to verify time have returned error output

    Happy to help and thanks for the rep

+ 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: 2
    Last Post: 03-07-2014, 08:46 PM
  2. [SOLVED] Run-time error '424': Wrong value returned
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-08-2012, 08:14 AM
  3. If statement run time error
    By slim1313 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-14-2009, 01:41 PM
  4. No value returned in if statement
    By Shellack in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2006, 03:55 PM
  5. [SOLVED] Run-time error '9' on With statement
    By xlcharlie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2005, 03:10 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