Function Definition
The NETWORKDAYS function calculates the number of working days between two dates, automatically excluding weekends and specified holidays.
Parameters
- start_date (required): Start date of the period
- end_date (required): End date of the period
- [holidays] (optional): Range of holiday dates to exclude
* Recommended date format: DATE(year,month,day) e.g. DATE(2023,12,25)
Basic Syntax Example
=NETWORKDAYS("2024-01-01", "2024-01-31")
Calculates workdays in January 2024 excluding Saturdays/Sundays
Holiday Exclusion Example
=NETWORKDAYS(DATE(2023,11,1), DATE(2023,11,30), C2:C4)
Where C2:C4 contains:
2023-11-23 (Thanksgiving)
2023-11-24 (Black Friday)
Return Value
Returns integer representing net workdays, including the start date if it's a workday. Example:
From 2023-12-18 (Monday) to 2023-12-22 (Friday) returns 5 days
Important Notes
- Default weekend: Saturday-Sunday (use NETWORKDAYS.INTL for custom weekends)
- Holidays must be valid date values
- Returns #VALUE! error for invalid dates
- Negative result when start_date > end_date
Practical Use Cases
Project Management:
Calculate deadline durations excluding public holidays
HR Applications:
Track employee service days or probation periods
Error Troubleshooting
Error | Solution |
---|---|
#VALUE! | Verify date formats in all arguments |
Inaccurate count | Check for hidden characters in holiday ranges |
Pro Tips
Create dynamic holiday calendars:
1. Use named ranges for holiday lists
2. Combine with data validation dropdowns
3. Link to official holiday calendars via Power Query