Share via

Networkday function calculation error (at least it seems to me)

Anonymous
2016-08-23T06:49:41+00:00

Hi,

I'm trying to calculate net work day between two date without considering any weekend or holiday using NETWORKDAYS function. The formula looks like this =NETWORKDAYS(DATE(2016,8,13),DATE(2016,8,13)) which returns 0 workday where it suppose to return 1. The NETWORKDAYS.INTL version of this formula also returns 0. So far I've found this occurs for the following start and end date, DATE(2016,8,13), DATE(2016,8,14), and DATE(2017,8,13). This formula returns 1 for the following date =NETWORKDAYS(DATE(2018,8,13),DATE(2018,8,13)). Not sure what I'm missing here but any guidance will be deeply appreciated.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2016-08-23T07:56:55+00:00

If you have you holiday dates in a range named Holidays, a start date in A1 and an end date in A2

=A2-A1+1-COUNTIFS(Holidays,">="&A1,Holidays,"<="&A2)

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-08-23T07:35:57+00:00

    Thank you very much for your reply. I'm tying not to considering any weekend but holidays are ok. How do I accomplish that? The formula I've posted is just a skeleton one. In reality I wouldn't know which date will be Saturdays and Sundays.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-08-23T07:31:42+00:00

    Thank you for your reply. I understand the condition and that's why I'm tying not to considering any weekend.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-08-23T07:10:43+00:00

    Hi.

    If the date in question is a weekend (or holiday) date, then obviously 0 will be returned; otherwise 1 will be returned.

    Regards

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-08-23T07:10:24+00:00

    NETWORKDAYS treats Saturdays and Sundays as non-working days.

    The dates you are using to get 0 are Saturday or Sunday.

    If you just want the number of days inclusive between two dates A1 and A2

    =A2-A1+1

    Was this answer helpful?

    0 comments No comments