How to make a number less than 0 show up as 0
I am trying to calculate the number of working days remaining in a project plan, but if the end date is in the past it is showing negative numbers. How do I change this to show a 0 instead of the negative number if the task is complete? This is the current formula I am using: =IF(ISERROR(NETWORKDAYS(TODAY(), [End Date]@row)), "", NETWORKDAYS(TODAY(), [End Date]@row))
Best Answer
-
Try this:
=IFERROR(IF(NETWORKDAYS(TODAY(), [End Date]@row) >= 0, NETWORKDAYS(TODAY(), [End Date]@row), 0), "")
If the networkdays is 0 or greater, give me the networkdays; otherwise (i.e. networkdays < 0), give me 0.
(The IFERROR suppresses error messages on rows where you don't have an End Date.)
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
-
=IF(NETWORKDAYS(TODAY(), [End Date]@row) < 0, 0, NETWORKDAYS(TODAY(), [End Date]@row))
-
Try this:
=IFERROR(IF(NETWORKDAYS(TODAY(), [End Date]@row) >= 0, NETWORKDAYS(TODAY(), [End Date]@row), 0), "")
If the networkdays is 0 or greater, give me the networkdays; otherwise (i.e. networkdays < 0), give me 0.
(The IFERROR suppresses error messages on rows where you don't have an End Date.)
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!
-
Thank you so much! This worked!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.6K Get Help
- 403 Global Discussions
- 215 Industry Talk
- 455 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 56 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!