ColinPearsonEIT
New Member
- Joined
- Jan 15, 2024
- Messages
- 8
- Office Version
- 2021
- Platform
- Windows
Good Morning/Afternoon/Evening, depending on where you are on the planet. I have most of a sheet developed that counts work days, Saturdays worked, Sundays worked, and tallies up hours that are worked at straight time, time and a half, and double time. I had previously ignored holidays since this is for estimating purposes only and if I'm off by a a few days per year, it's not a big deal. However, one of our sales guys asked me if I could modify the sheet to exclude holidays. So I made a list of all the holidays for the next several years and began to mess with it to see how it works.
It looks like putting an argument in the [holiday] section of NETWORKDAYS.INTL works as I expected, except that it removes a day from the result for EVERY holiday in your list, whether or not they fall within the start_date and end_date.
HEre's some examples of the results I get using with the date range of 2024/01/01 - 2024/12/31, assuming we work 7 days/week
=IF(ISBLANK(C52),0,NETWORKDAYS.INTL(C52,D52,K52,0)) --- I get 366 days worked (being a leap year this year)
=IF(ISBLANK(C52),0,NETWORKDAYS.INTL(C52,D52,K52,HOLIDAZE[2024])) --- I get 353 by removing the 13 holidays in 2024 we would normally get off
=IF(ISBLANK(C52),0,NETWORKDAYS.INTL(C52,D52,K52,HOLIDAZE[[2024]:[2030]]))--- I EXPECTED to still get 353 but instead get 314 b/c it's removing all holidays from my list of 2024-2030 holidays that I created.
Is there a way to exclude holidays only if they fall within the date range entered by the user?
THANKS!!
It looks like putting an argument in the [holiday] section of NETWORKDAYS.INTL works as I expected, except that it removes a day from the result for EVERY holiday in your list, whether or not they fall within the start_date and end_date.
HEre's some examples of the results I get using with the date range of 2024/01/01 - 2024/12/31, assuming we work 7 days/week
=IF(ISBLANK(C52),0,NETWORKDAYS.INTL(C52,D52,K52,0)) --- I get 366 days worked (being a leap year this year)
=IF(ISBLANK(C52),0,NETWORKDAYS.INTL(C52,D52,K52,HOLIDAZE[2024])) --- I get 353 by removing the 13 holidays in 2024 we would normally get off
=IF(ISBLANK(C52),0,NETWORKDAYS.INTL(C52,D52,K52,HOLIDAZE[[2024]:[2030]]))--- I EXPECTED to still get 353 but instead get 314 b/c it's removing all holidays from my list of 2024-2030 holidays that I created.
Is there a way to exclude holidays only if they fall within the date range entered by the user?
THANKS!!