@BusinessDays trouble

I’m trying to calculate the days between Estimated Completion Date and Closed date. If either are blank, I want to skip processing. If they are the same dates, I want it to be 0. If we get finished AHEAD of schedule, the return of @BusinessDays is always -1. So if it is -1, I want to flop the dates and get the difference.

With thie below formula, I get 1 when both dates are empty OR if we finish early OR if we finish late! The @All seems to make a difference as I get errors if it is not there when a script runs the ComputeWithForm.

Days := @If(EstDate = “” | DateClosed = “”;“”; EstDate = DateClosed;0;

@BusinessDays(EstDate ; DateClosed;1:7;HolidayList)) ;

@If(Days = -1;@TextToNumber(“-” + @Text(@If(EstDate = “” | DateClosed = “”;“”; @BusinessDays(DateClosed;EstDate ; 1:7;HolidayList))));Days) ;@All