Number of days between 2 dates ignoring errors

Options
Eenmeier
Eenmeier ✭✭✭

Hi. I need to return the number of days that have lapsed between 2 dates, but to ignore errors and return nothing. Here is what I am trying and it seems to work but its putting a - in front of the count. Opp Approved Date is always prior to Live Date. I would like to display without the negative in front if possible. Thank you in advance.

=IFERROR(NETDAYS([Live Date]@row, [Opp Approved Date]@row), "")

Best Answer

  • Anjanesh Vaidya
    Anjanesh Vaidya ✭✭✭✭✭
    Answer βœ“

    Hi Eenmeier,

    You can try following formula in the sheet summary.

    =AVERAGEIF([Live Date]:[Live Date], AND(MONTH(@cell) = 1, YEAR(@cell) = 2024), [Dates to live]:[Dates to live])

    You can specify the year and the month accordingly by modifying the formula.

    image.png

    I hope it will work.

    Thankyou!

    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

  • John_Foster
    John_Foster Community Champion

    Hi @Eenmeier,

    Try switching the calculation round as per below and see if that fixes the issue.

    =IFERROR(NETDAYS([Opp Approved Date]@row, [Live Date]@row), "")

    John

  • Eenmeier
    Eenmeier ✭✭✭

    Well I'll be that did the trick. Thank you so much!

  • John_Foster
    John_Foster Community Champion

    @Eenmeier, you are very welcome.

  • Eenmeier
    Eenmeier ✭✭✭

    Hi. Sorry need to open this back up for an extra layer. Using Days to Live column from above thread, I need to add summary fields for the average number of days to go live by each month. I am getting Incorrect Argument Set when trying the below for Jan. Any thoughts on how to make this work in the sheet summary?

    =AVERAGEIF([Live Date]:[Live Date], IFERROR(MONTH(@cell), 0) = "1", [Live Date]:[Live Date], IFERROR(YEAR(@cell), 0) = "2023", [Days to Live]:[Days to Live])


    image.png


  • Anjanesh Vaidya
    Anjanesh Vaidya ✭✭✭✭✭
    Answer βœ“

    Hi Eenmeier,

    You can try following formula in the sheet summary.

    =AVERAGEIF([Live Date]:[Live Date], AND(MONTH(@cell) = 1, YEAR(@cell) = 2024), [Dates to live]:[Dates to live])

    You can specify the year and the month accordingly by modifying the formula.

    image.png

    I hope it will work.

    Thankyou!

    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⬆️

  • Eenmeier
    Eenmeier ✭✭✭

    Thank you Anjanesh!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!