# How to return a MAX Value of "0" if Remaining # of Weeks is < 0

Hello Amazing Community,

I'm trying to create a formula to Remaining Number of Weeks on a project.

Start Date = 5/30/23

End Date = 6/15/23

Formula for Remaining # of Weeks (from today) =NETDAYS(TODAY(), [End Date]@row) / 7 = -2.9

**Problem is when End Date is in the past, and TODAY keeps changing, in which case, Remaining # of Weeks becomes a bigger negative number. How do I edit this formula where the MAX returned value is =0 since technically you can't have a remaining # of weeks to be a negative number?

Hope that makes sense. Thank you

Tags:

• ✭✭✭✭✭✭

You could use the MAX function.

=MAX(current formula, 0)

=MAX(NETDAYS(TODAY(), [End Date]@row) / 7, 0)

• ✭✭✭✭✭✭

=IF([End Date]@row > TODAY(), NETDAYS(TODAY(), [End Date]@row) / 7, 0)

• ✭✭✭✭✭✭

You could use the MAX function.

=MAX(current formula, 0)

=MAX(NETDAYS(TODAY(), [End Date]@row) / 7, 0)

• @Paul Newcome @Carson Penticuff Thank you both. This worked.

• ✭✭✭✭✭✭

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!