Date formula: Return a blank if a cell has no date

I have a date formula =NETDAYS([DUO Link Sent]@row, TODAY(1))

If the DUO Link Sent cell is empty it's returning #INVALID DATA. How do I get this formula to return a blank cell if the DUO Link Set does not have a date in it yet.

Best Answer

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    edited 09/28/22 Answer ✓

    @jyoung_autosoftdms

    Two methods:

    Wrap your formula in IFERROR. This suppresses any error messages and replaces them with whatever you want, For your example, replace the error message with blankness:

    =IFERROR(NETDAYS([DUO Link Sent]@row, TODAY(1)), "")

    Alternatively, you can use an IF statement that runs the formula if DUO Link Sent on that row contains a date value, but does something else if it's not a date value:

    =IF(ISDATE([DUO Link Sent]@row, NETDAYS([DUO Link Sent]@row, TODAY(1)), NETDAYS(CreatedDate@row, TODAY(1)))

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    edited 09/28/22 Answer ✓

    @jyoung_autosoftdms

    Two methods:

    Wrap your formula in IFERROR. This suppresses any error messages and replaces them with whatever you want, For your example, replace the error message with blankness:

    =IFERROR(NETDAYS([DUO Link Sent]@row, TODAY(1)), "")

    Alternatively, you can use an IF statement that runs the formula if DUO Link Sent on that row contains a date value, but does something else if it's not a date value:

    =IF(ISDATE([DUO Link Sent]@row, NETDAYS([DUO Link Sent]@row, TODAY(1)), NETDAYS(CreatedDate@row, TODAY(1)))

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

  • This is great, thank you so much for the quick response. Someday I hope I can share with others and return the favor.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!