I. Intro
NETWORKDAYS function is used to calculate the number of working days between two dates, excluding weekends and specified holidays.
II. About the function
- Formula: =NETWORKDAYS(start_date, end_date, [holidays])
- Arguments:
- start_date: The start date of the period.
- end_date: The end date of the period.
- holidays: Optional. The dates of the holidays to be excluded. It can be one or more holiday dates. If there is more than one date, it needs to be in a cell range.
- Example: =NETWORKDAYS("2021-1-1", "2021-12-31",B2:B3) calculates the number of working days in 2021, excluding weekends and the two holidays in the B2:B3 range. The result is 260 days.
Note: You can enter the dates directly or reference cells. If manually entered, the dates must be enclosed in double quotation marks and be in the correct date format.
250px|700px|reset
II. Steps
Use the function
- Open the spreadsheet, select a cell, and enter the formula =NETWORKDAYS("2021-1-1", "2021-6-30", A2:A7).
- "2021-1-1", "2021-6-30": The start and end dates indicate that this formula is used to calculate the working days of the first half of 2021.
- A2:A7: This area contains all the dates of holidays for the first half of the year.
- Press Enter to get the result.
250px|700px|reset
Delete the function
Select the cell with the function and press Delete.