Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Another date question? Thanks smozgur and Dave. Problem So

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi all!

    Column E = Date Opened
    Column F = Date Closed
    Column O = Difference in days

    The above is fine...

    Here's my problem...

    Ex.
    Cell E5 = 04/02/2002
    Cell F5 = EMPTY or ""

    I would like to display the days opened in
    Cell O5

    Meaning Today() - F5

    The formula I am trying to use is giving me the #NAME?

    =IF(AND(val(E5)<>0,val(F5)=0),NOW()-E5,F5-E5)

    If E5 contains a date and F5 does not contain a date then formula needs to return the difference in days between Now - E5

    Thanks for the help!

    Tom

    [ This Message was edited by: TsTom on 2002-04-06 11:07 ]

    [ This Message was edited by: TsTom on 2002-04-06 11:23 ]

  2. #2
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    812
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    val is not Excel function (if you didnot do it in a module), just remove them, also you dont need a function like val there. Try using this:

    =IF(AND(E5<>0,F5=0),TODAY()-E5,F5-E5)

    regards

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Calgary, Alberta Canada
    Posts
    3,420
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default



    You may need something like

    =IF(AND(E5>0,F5=0),E5-TODAY(),F5-E5)

  4. #4
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    812
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    PS:
    val = VALUE in excel



  5. #5
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks guys.
    That did solve my problem.

  6. #6
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    812
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Nice to hear that.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •