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
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!