+ Reply to Thread
Results 1 to 4 of 4

Complex IF and Date/Time Confusion

  1. #1
    Registered User
    Join Date
    11-01-2011
    Location
    USA
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    41

    Complex IF and Date/Time Confusion

    I can't seem to get these formulas to work well together. If I input the time into J23 by hand, then L23 works properly, but as-is, J23 is incorrect. Also, I25 works in a test document I created, but fails to work properly in this finished document.

    What are your thought? I'm simply lost.

    (Attached)Where as:

    H23 is the date and time the document was created (pulled from a macro)
    I23 is the date pulled from H23
    J23 is the time pulled from H23
    K23 is the day of the week expressed as a number
    I25 is a formula to calculate a due date that is I23 + condition of I25 formula
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,961

    Re: Complex IF and Date/Time Confusion

    I am not sure what answer you expect, so I'm not sure exactly what's wrong, but I have an educated guess.

    Quote Originally Posted by firehousetk View Post
    J23 is the time pulled from H23
    J23 is not the time, it is the same value as H23 simply formatted to look like a time. If you want just the time then you need this:

    =H23-INT(H23)

    The same is true for the date, but that part may not be causing you any problems. But to get just the date in I23 use this:

    =INT(H23)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-01-2011
    Location
    USA
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    41

    Re: Complex IF and Date/Time Confusion

    Yes, that worked great for the time and date. I'm now getting the correct value L23. Now, I have to sort out the mess of a formula that is I25! Thanks very much!

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Complex IF and Date/Time Confusion

    Another way to extract time =MOD(H23,1)

+ 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