+ Reply to Thread
Results 1 to 4 of 4

don't calculate if no date is entered

Hybrid View

  1. #1
    Mike
    Guest

    don't calculate if no date is entered

    I need to calculate days passed up to today, using the formula
    DAYS360(D2,TODAY()) which works great. However, in a row where a date has
    not been entered yet the formula returns 38314, which I assume is calculating
    from Jan 1900. What can I do to get Excel to just display 0 if no date is
    enetered yet?

    ex. of worksheet


    | A | B | C |
    D |
    ________________________________________________________________
    1 |DAYS OUT | NAME | DVD TITLE | DATE CHECKED OUT |
    ________________________________________________________________
    2 |20 | John Doe | Chicken Little | Wed, Apr 20,
    2006 |
    ________________________________________________________________
    3 |38314 | | |
    |
    _________________________________________________________________

    Thanks.........



  2. #2
    Registered User
    Join Date
    07-01-2006
    Posts
    8
    If(d2 = 0; 0; Days360(d2,today()))

  3. #3
    Fred Smith
    Guest

    Re: don't calculate if no date is entered

    While we're at it, DAYS360 will not calculate "days passed up to today" in all
    cases. You most likely want a simple subtraction, as in:

    =today()-d2

    --
    Regards,
    Fred


    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    >I need to calculate days passed up to today, using the formula
    > DAYS360(D2,TODAY()) which works great. However, in a row where a date has
    > not been entered yet the formula returns 38314, which I assume is calculating
    > from Jan 1900. What can I do to get Excel to just display 0 if no date is
    > enetered yet?
    >
    > ex. of worksheet
    >
    >
    > | A | B | C |
    > D |
    > ________________________________________________________________
    > 1 |DAYS OUT | NAME | DVD TITLE | DATE CHECKED OUT |
    > ________________________________________________________________
    > 2 |20 | John Doe | Chicken Little | Wed, Apr 20,
    > 2006 |
    > ________________________________________________________________
    > 3 |38314 | | |
    > |
    > _________________________________________________________________
    >
    > Thanks.........
    >
    >




  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792
    =if(d2,today()-d2,0)

+ 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