johnbird1988
Board Regular
- Joined
- Oct 6, 2009
- Messages
- 199
Hello,
I am trying to count the number of days that fall into a working week (Mon-Fri). My dates are in range J6:NK6 and I want to count the number of times "S" appears in range J10:NK10 that is on a weekday only. But here is the tricky part I also need to exclude bank holidays that are in a named range called "Holidays".
So far I have managed to get the counting of the working week by using:
However I cannot get it to also not included bank holidays. I have tried
But with no luck.
I think I am on the correct lines, but just need some help with the last bit.
Thank you,
John
I am trying to count the number of days that fall into a working week (Mon-Fri). My dates are in range J6:NK6 and I want to count the number of times "S" appears in range J10:NK10 that is on a weekday only. But here is the tricky part I also need to exclude bank holidays that are in a named range called "Holidays".
So far I have managed to get the counting of the working week by using:
Code:
=SUMPRODUCT((WEEKDAY($J6:$NK6,2)<6)*($J10:$NK10="S"))
However I cannot get it to also not included bank holidays. I have tried
Code:
=SUMPRODUCT((WEEKDAY($J6:$NK6,2)<6)*($J10:$NK10="S")*($J6:$NK6<>Holiday))
But with no luck.
I think I am on the correct lines, but just need some help with the last bit.
Thank you,
John