If the value is negative, make it 0

hflorez ✭✭
edited 11/17/22 in Formulas and Functions

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


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!