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
-
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
-
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
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.4K Get Help
- 364 Global Discussions
- 200 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!