Offset Networkdays Count

I am currently using the following formula

=IF([End Dt]@row = "", "", NETWORKDAYS([Start Dt]@row, [End Dt]@row, holidays:holidays))

If I have a Start Dt of 7/18/21 and an End Dt of 7/18/21 the formula give me an answer of 1. I want to be able to off set that by -1 because the task ended on the same day that it began, therefore the result should be 0.

I have tried using the formula below with no luck, any suggestions or corrections would be much appreciated.

=IF([End Dt]@row = "", "", NETWORKDAYS([Start Dt]@row, [End Dt]@row, holidays:holidays),if>0,-1,0)

Tags:

Answers

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    Hi @JP Pedicino

    Hope you are fine, please try the following formula i test it and it's worked:

    =IF(ISBLANK([End Dt]@row) = "", "", NETWORKDAYS([Start Dt]@row, [End Dt]@row, holidays:holidays))

    the following screenshot shows the result:

    and please check the following Usage Notes:

    • WORKDAY, NETWORKDAY, and NETWORKDAYS count Saturday and Sunday as non-working days. If dependencies are enabled on your sheet you can customize the non-working days and the formulas will use your settings in calculations.
    • You can designate additional dates as nonworking to exclude them when calculating the number of working days. To do this, enter each holiday/non-working day into a cell and then reference the range of cells in your NETWORKDAY formula.


    PMP Certified

    [email protected]

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!