Results 1 to 3 of 3

Thread: Conditional formula for date calculations

  1. #1

    Conditional formula for date calculations



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am trying to construct a formula to calculate the number of days between 2 dates. If cell A1(starting date) is blank, return "0". If cell B1 (end date) is blank, return the difference between A1 and today's date. I have this: =ABS(TODAY()-E7)

  2. #2
    Acolyte Canapone's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    97
    Articles
    0
    Hi, an attempt. In E7-F7 the two dates

    =if(isblank(E7),0,if(isblank(F7),today()-E7,F7-E7))
    or

    =if(isblank(F7),today()-E7,(F7-E7)*(E7>0))
    Maybe it helps

  3. #3
    Super Moderator Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,317
    Articles
    0
    Excel Version
    2010 on Xubuntu
    Perhaps =(A1<>"")*(B1-A1)

Posting Permissions

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