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
- Customer Resources
- 67.1K Get Help
- 448 Global Discussions
- 154 Industry Talk
- 504 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 512 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!