Networkdays Help/Issue?

C. Ruiz
C. Ruiz ✭✭✭
edited 06/05/23 in Formulas and Functions

Hi, I have a formula that for networkdays: Here is the Formula.


=IFERROR(NETWORKDAYS(TODAY(), [Due No Later Than]@row, Holidays:Holidays) - 1, "NA")


However, anytime the days goes to negative it instantly goes to negative 3 (-3). So the calculation shoots from 0 to -3 the when the day shifts even though it should be -1, So all my negative numbers are off by -2. Here is an example.


As you can see, the network days are all correct for the positive values, but immediately once it goes negative it subtracts and additional 2 days. I've confirmed weekends and holidays are not the issue either by testing the formula with different dates. It's just negative values that are the issue.


Anyone know why this is happening?


I can do a workaround fix by using this formula:

=IFERROR(IF((NETWORKDAYS(TODAY(), [Due No Later Than]@row, Holidays:Holidays) - 1) >= 0, NETWORKDAYS(TODAY(), [Due No Later Than]@row, Holidays:Holidays) - 1, NETWORKDAYS(TODAY(), [Due No Later Than]@row, Holidays:Holidays) + 1), "NA")


But it just seems backwards to have to do this..

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!