Синтаксис
WORKDAY(date, num_days, [holidays])
- дата—The date to begin counting from
- num_days—Число дней до (отрицательное число) или после (положительное число) текущей даты.
- Выходные—(необязательно)The dates to exclude from the count
Пример использования
WORKDAY([Due Date]1; 30; [Due Date]2:[Due Date]3)
Примечания об использовании
- WORKDAY, NETWORKDAY, and NETWORKDAYS count Saturday and Sunday as non-working days. If dependencies are enabled on your sheet, you can customize the non-working days, so the formulas use your settings in calculations.
- You can designate other dates as nonworking to exclude them when calculating the new date. To do this, enter each holiday/non-working day into a cell and then reference the range of cells in your WORKDAY formula.
Примеры
В примере ниже используется информация из этой таблицы.
Номер строки | Предмет одежды | Исполнитель | Дата заказа | Выходные |
---|---|---|---|---|
1 | Футболка | corey@smartsheet.com | 12.02.2023 | 12/25/23 |
2 | Брюки | mark@smartsheet.com | 15.02.2023 | 11/28/23 |
3 | Куртка | sara@smartsheet.com | 02/20/23 | 02/14/24 |
4 | Куртка | tim@smartsheet.com | 02/20/23 | 07/04/23 |
Вот несколько примеров использования функции TODAY применительно к таблице выше.
Формула | Описание | Результат |
---|---|---|
=WORKDAY([Order Date]1, -5) | Return the specific workday 5 days before the value in row 1 of the Order Date column. | 02/05/23 |
=WORKDAY([Order Date]1, -5) + " " | If the WORKDAY formula is returning the desired result in a Text/Number column instead of a Date column, add + “ “ to the formula to prevent an error. Notice this formula is the same as the one above with the added value, so you can add it to a text column. | 02/05/23 |
=WORKDAY([Order Date]3, 15, DATE(2019, 3, 1)) | Return the specific workday 15 days after the value in row 3 of the Order Date column. Exclude the date 03/01/23. | 03/14/23 |
=WORKDAY([Order Date]4, 30, Holidays:Holidays) | When excluding holiday dates, you can also reference a range of excluded dates or other single-cell values. Notice this formula is the same as the above. The difference being is that it’s excluding all the range of dates found in the Holiday column. | 04/03/23 |
Остались вопросы?
Используйте шаблон Руководство по работе с формулами, чтобы просмотреть дополнительные ресурсы и изучить более 100 формул. Руководство содержит глоссарий, описывающий каждую функцию, обращение с которой вы сможете отработать на практике, и примеры как часто используемых, так и более сложных функций.
Изучить примеры того, как эту функцию применяют другие пользователи Smartsheet, или задать интересующий вопрос можно в Сообществе Smartsheet.