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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!