If the value is negative, make it 0
![hflorez](https://us.v-cdn.net/6031209/uploads/defaultavatar/nWRMFRX6I99I6.jpg)
My problem is that I have a formula that takes into consideration the Start Date and End Date of a task, then divides its by duration as you can see in the attachment to give me a expected progress percentage of what I should have accomplished for that task by the current day. When I have a future start and end date I get a negative result, which is understandable since you can't have made any progress yet because the start date hasn't arrived. The sheet looks a bit sloppy with the negative information, and I would like to have it return a value of 0 if the result is negative. I can't get it to work. I assume its a IF statement that I need to add, but nothing seems to work correctly. Please Help. Here is the formula I used so far, like I said it works, but I can't adjust it to output 0 if the result is negative.
=(NETWORKDAYS([Start Date]@row, MIN(TODAY(), [End Date]@row)) / Duration@row
for a cleaner look.
Best Answer
-
You would use a MAX function like so:
=MAX(0, original_formula)
Answers
-
You would use a MAX function like so:
=MAX(0, original_formula)
-
@Paul Newcome that worked great. I was over complicating things. Thank You.
-
Happy to help. 👍️
-
@Paul Newcome if you dont mind, I need help with one more https://community.smartsheet.com/discussion/98666/health-column-formula-for-dependencies#latest
Help Article Resources
Categories
Check out the Formula Handbook template!