Formula Help Calculate # of Days with 2 date fields, unless date field is blank use todays date.

I need a formula for column "Days to Build" I want the number of days it has taken to build using Build End Date - Build Start Date = Days to Build, but if there is no Build end date I want it to be today - build start date = days to build.


Tags:

Best Answer

  • Anjanesh Vaidya
    Anjanesh Vaidya ✭✭✭✭
    Answer ✓

    Hi Danielle Maroon,

    You can try the below formula-

    =IF(AND(NOT(ISBLANK([Build Start Date]@row)), NOT(ISBLANK([Build End Date]@row))), [Build End Date]@row - [Build Start Date]@row, IF(ISBLANK([Build End Date]@row), TODAY() - [Build Start Date]@row, ""))

    As I tested it is working fine for me, Hope it will work for you too!

    Thank You !

    Anjanesh Vaidya

Answers

  • Anjanesh Vaidya
    Anjanesh Vaidya ✭✭✭✭
    Answer ✓

    Hi Danielle Maroon,

    You can try the below formula-

    =IF(AND(NOT(ISBLANK([Build Start Date]@row)), NOT(ISBLANK([Build End Date]@row))), [Build End Date]@row - [Build Start Date]@row, IF(ISBLANK([Build End Date]@row), TODAY() - [Build Start Date]@row, ""))

    As I tested it is working fine for me, Hope it will work for you too!

    Thank You !

    Anjanesh Vaidya

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!