Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: subtracting dates

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    John Hamilton
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    i am trying to subtract an earlier date from todays date to determine aging since earlier date. how can i return a "zero" or "blank" result if the "earlier date cell" is "blank"?

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,006
    Post Thanks / Like
    Mentioned
    37 Post(s)
    Tagged
    7 Thread(s)

    Default

    On 2002-04-18 07:50, pottytenspot wrote:
    i am trying to subtract an earlier date from todays date to determine aging since earlier date. how can i return a "zero" or "blank" result if the "earlier date cell" is "blank"?
    =IF(A1,B1-A1,0)

    where A1 < B1 in time.

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    for a zero, you could use
    =(TODAY()-A1)*(A1>0)

  4. #4
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Assuming that Column A is earlier date and Column B is later date then put the following formula in Column C:
    =IF(A1="","",B1-A1)

    or

    =IF(A1,B1-A1,"")
    _________________
    Hope this helps.
    Kind regards, Al.

    [ This Message was edited by: Al Chara on 2002-04-18 08:54 ]

  5. #5
    New Member
    Join Date
    Apr 2002
    Location
    John Hamilton
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    that worked fine.

    Thanks,
    pottytenspot

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
  •