Working Days across a Date range
Hello friends!
I'm hoping to have a column which automatically populates the number of working days in a given period from a [Start Date] and [Number of Months] columns.
e.g.
Start Date = 3rd July 2023
Number of Months = 2
Result = 45 days
- 63 calendar days – 18 days skipped: 9 Saturdays, 9 Sundays
Would anyone have a solution to this already? I'd be forever grateful!! 🙌
Thank you!
Del
Answers
-
You'll need something like this:
=NETWORKDAYS([Start Date]@row, IFERROR(DATE(YEAR([Start Date]@row) + ROUNDDOWN((MONTH([Start Date]@row) + [Number Of Months]@row) / 12, 0) + IF(IF(MOD(MONTH([Start Date]@row) + [Number Of Months]@row, 12) = 0, 12, MOD(MONTH([Start Date]@row) + [Number Of Months]@row, 12)) = 12, -1) - IF(AND(ABS([Number Of Months]@row) - MONTH([Start Date]@row) <> 12, [Number Of Months]@row < 0, ABS([Number Of Months]@row) > MONTH([Start Date]@row)), 1, 0), IF(MOD(MONTH([Start Date]@row) + [Number Of Months]@row, 12) = 0, 12, MOD(MONTH([Start Date]@row) + [Number Of Months]@row, 12)), 1), DATE(IF(MONTH([Start Date]@row) - ABS([Number Of Months]@row) < 1, YEAR([Start Date]@row) - 1, YEAR([Start Date]@row)), IF(MONTH([Start Date]@row) - ABS([Number Of Months]@row) < 1, MONTH([Start Date]@row) + (12 - ABS([Number Of Months]@row)), MONTH([Start Date]@row) - ABS([Number Of Months]@row)), DAY([Start Date]@row))))
-
Wow! Let me try and digest this!! I'll let you know 👌
-
Basically... I already had an EDATE formula put together that allows you to put a variable (but whole) number of months in one column and get the date coming off of the Start Date.
Using that to output the "end date" for the NETWORKDAYS function should give you what you need.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 406 Global Discussions
- 216 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!