+ Reply to Thread
Results 1 to 6 of 6

Assume today's date if blank

  1. #1
    Registered User
    Join Date
    11-13-2006
    Posts
    21

    Assume today's date if blank

    I have a tracking sheet where rows represent properties and columns represent certificates issued against properties. The date on which the certificate is received is entered into the cells.

    For example:
    Please Login or Register  to view this content.
    In the third column I would like to show the days between the certificate issue dates, which is easy (B3-B2). However, if the second certificate date is blank (as is the case with property 35), I want the days to be calculated as if the second certificate date were today's date. So because today is 10-Oct-2007, the number of days would be 4 since 06-Oct-2007.

    How could I achieve this?

    Many thanks,

    GDI

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Not sure if its B3 and B2 you're comparing or is it C2 and B2....

    Anyways, try:

    =If(B3="",Today()-B2,B3-B2)

    adjusting references to suit.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    I'm assuming you mean C2-B2. You could use

    =IF(C2,C2,TODAY())-B2

  4. #4
    Registered User
    Join Date
    11-13-2006
    Posts
    21
    Wow, fast response!

    Sorry, I got my rows and columns mixed up. You're right, I meant C2-B2.

    Thanks this is excellent, both solutions worked for my case. I understood the first (why didn't I think of that?!), but I'm not sure how the second works.

    The way I read it, this means: If C2 = C2, use C2's value, if not, use TODAY. Or how is it read logically?

    Cheers,

    GDI

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    =IF(C2

    returns TRUE if C2 is not blank or zero. it's perhaps more transparent to use

    =IF(C2>0,C2,TODAY())-B2

  6. #6
    Registered User
    Join Date
    11-13-2006
    Posts
    21
    I see, understood. Many thanks for your help!

+ 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