# Error Catch of Weekdays Left when Due Date Empty

I am having a hard time making this formula work. I can make it work if i simplify the main equation that i want to use. The formula works on its own but returns errors when due date is empty.
Only have a “Due Date” field and “Days Left”. Want Days Left to be workdays only. and want to show No Date or 0 if “Due Date” empty.

IF({Due Date},(ROUND(DAYS({Due Date},Today())-(2*(WEEKNUM({Due Date})-WEEKNUM(Today()))),1)),“NO DATE”)

@sfederle

Due to the way that monday formulas are processed, even functions that are not needed are sometimes calculated. In your case, though the DAYS() and WEEKNUM() values do not need to be calculated when {Due Date} is blank, they are. And therefore they will always need to be able to be calculated.

This should get you closer:

``````IF({Due Date},
ROUND(DAYS(FORMAT_DATE(IF({Due Date},
{Due Date},"1/1/1")),
FORMAT_DATE(Today())) -
(2 * (WEEKNUM(IF({Due Date}, {Due Date},
"1/1/1")) -
WEEKNUM(Today()))), 0),
"NO DATE"
)
``````

This works great and i see what you did there. Thank you for your Help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.