Why is December's NETWORKDAYS formula not calculating correctly?
Hi - I have this formula that works perfectly for the year, but when I get to December it is calculating an odd negative number. Can anyone help me understand why and what I need to do to correct it?
Best Answer
-
Exactly.
=IF([Team Member / Projects]@row = "", "", NETWORKDAYS([December Start Date]@row, [December End Date]@row, {Metadata | Holidays}) * 8)
Answers
-
The second DATE function should have one added to the year.
IFERROR(DATE(…………………..), DATE(YEAR([December Start Date]@row) + 1, 1, 1)), …………………….)
-
@Paul Newcome I added the +1 to the second DATE function, but it still isn't calculating correctly. The NETWORKDAYS [holiday] portion is linked to our company's list of holidays. There is only 1 holiday in December. With 22 workdays, minus the 1 holiday, times 8 hours should total to 168 hours, but the updated formula with the +1 is totaling to 176.
-
Your formula is setting the end date as the first of the following month which would be Jan 1 instead of Dec 31.
Is there a reason you are using this calculation as opposed to just referencing the [December End Date] column the same way you are referencing the [December Start Date] column?
-
I just copied and pasted the formula I used for the other months. Should all the months be referencing the End Date vs the Start Date? So for December, I just need to change Start with End?
-
Oh I see what you're saying. Going back to the basic formula structure of referencing Start, End, Holiday. For some reason, in my formula sheet, I had what is in the screen shots to determine the Work Day hours. Not sure why it's all drawn out that way.
-
Exactly.
=IF([Team Member / Projects]@row = "", "", NETWORKDAYS([December Start Date]@row, [December End Date]@row, {Metadata | Holidays}) * 8)
-
Going back to the basics worked perfectly. I'll have to update my formula sheet. Thanks for your help!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!