Get workdays between dates

 

Summary

To calculate the number of workdays between two dates, you can use the NETWORKDAYS function. 

Formula

=NETWORKDAYS(start_date,end_date,holidays)


Explanation

To calculate the number of workdays between two dates, you can use the NETWORKDAYS function. NETWORKDAYS automatically excludes weekends and it can optionally exclude a custom list of holidays as well.

As in the above example start date is January 18, 2022 in cell A2 and end date is February 18, 2022 in cell B2 so the  formula will be:

=NETWORKDAYS(A2,B2)

And the result will be 24

Note: NETWORKDAYS includes both the start and end dates in the calculation if they are workdays.

NETWORKDAYS can also exclude a custom list of holidays. For example, if you have holiday dates in C1:C10, you can tell NETWORKDAYS not to include these dates as workdays by adding that range as a third argument in the formula:

=NETWORKDAYS(A2,B2,C1:C10)

Custom weekends

If you need take into account custom weekends (i.e. weekends are Saturday, Sunday and Monday etc.) you'll need to switch to the more robust

NETWORKDAYS.INTL function which allows you to set what days of the week are considered weekends by supplying a weekend argument in the form of a numeric code.

Need a date?

If you need a date n workdays in the past or future then WORKDAY function is used.

As:



Recommended Articles

If Function















Comments

Popular posts from this blog

TDS on Salary – Entry in Tally

Post Dated Cheque (PDC) Management

Personal Accounts in Tally