Results 1 to 7 of 7

If-Then statement not properly displaying duration (G18) of two dates (E18 & F18)

Threaded View

  1. #1
    Registered User
    Join Date
    06-07-2018
    Location
    Raleigh, NC
    MS-Off Ver
    MS Office 2016
    Posts
    4

    Post If-Then statement not properly displaying duration (G18) of two dates (E18 & F18)

    E18 - Start Date (5/7/18)
    F18 - End Date (5/10/19)
    G18 - Duration in days (# days)

    G18 has the following formula:
    =IF(AND(DATEDIF(E19,F19,"yd")=0),"1",DATEDIF(E19,F19,"yd"))&IF(DATEDIF(E19,F19,"yd")=1," day"," days")

    I dragged G18 down to apply the formula to the rows below it (ie. G19, G20, G21, etc.), however E19/F19, E20/F20, E21/F21, etc. don't have any dates in them yet, so I want to keep G19, G20, G21, etc. blank.

    Currently, G19, G20, G21, etc. have "1 day" in them, which I don't want. It should be blank, but with the formula running for when dates are entered in E and F. Any suggestions? Thanks!
    Last edited by anujual; 06-07-2018 at 12:46 PM.

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