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

Options

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 ✓
    Options

    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

    Thanks,

    Anjanesh Vaidya

    Smartsheet Development, Ignatiuz Software

    Did this answer help you? Show some love by marking this answer as "Insightful💡" or "Awesome❤️" and "Vote Up⬆️

Answers

  • Anjanesh Vaidya
    Anjanesh Vaidya ✭✭✭✭✭
    Answer ✓
    Options

    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

    Thanks,

    Anjanesh Vaidya

    Smartsheet Development, Ignatiuz Software

    Did this answer help you? Show some love by marking this answer as "Insightful💡" or "Awesome❤️" and "Vote Up⬆️

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!