The WORKDAY function in Google Sheets is a powerful tool designed to calculate a target date based on a given number of working days. This function accounts for weekends and allows users to incorporate holidays, making it an essential feature for project management and scheduling tasks in a business environment.
Syntax
WORKDAY(start_date, num_days, [holidays])
- start_date: The initial date from which to begin counting.
- num_days: The number of working days to add to the start date. It can be a positive or negative integer.
- [holidays]: (Optional) A range of dates representing holidays to exclude from the calculation.
Example #1
WORKDAY("2023-10-01", 10)
The function calculates the date that is 10 working days after October 1, 2023, resulting in October 17, 2023.
Example #2
WORKDAY("2023-10-01", -5)
This calculates the date that is 5 working days before October 1, 2023, leading to September 25, 2023.
Example #3
WORKDAY("2023-10-01", 10, {"2023-10-10"})
This computes the date 10 working days after October 1, 2023, while excluding the holiday on October 10, resulting in October 18, 2023.
Error handling
- VALUE!: This error occurs if the start_date is not a valid date.
- NUM!: This indicates that the num_days parameter is invalid or results in a date that is not possible.
- REF!: This error arises when the holidays range contains invalid cell references.