Dapatkan tanggal dan hari kerja di masa depan atau masa lalu
=WORKDAY(start_date, days, [holidays])
| Parameter | Deskripsi |
|---|---|
start_date |
The date from which to start. |
days |
Working days before or after start_date. |
holidays |
[optional] A list of dates that are non-working days. |
To illustrate how WORKDAY works, assume we are scheduling a task that takes 5 working days, starting on Monday, July 1, 2024. The goal is to calculate
="1-Jul-2024"+5 // returns "6-Jul-2024"
If however, we use WORKDAY to calculate a date 5 days after July 1, it returns Monday, July 8, 2024:
=WORKDAY("1-Jul-2024",5) // returns "8-Jul-2024"
This is because WORKDAY automatically skips Saturday and Sunday when it calculates a result. If we extend the formula to provide holidays, one of whic
=WORKDAY("1-Jul-2024",5,{"4-Jul-2024";"2-Sep-2024"}) // returns "9-Jul-2024"
The formula in D5 does not use WORKDAY and simply adds 5 days to the start date:
=B5+C5 // returns "6-Jul-2024"
The formula in D6 uses the WORKDAY function but does not provide any holidays:
=WORKDAY(B6,C6)// returns "8-Jul-2024"
The formula in D7 provides holidays in the range G5:G6:
=WORKDAY(B7,C7,G5:G6) // returns "9-Jul-2024"