Count work days only

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:
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
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
networkdays() will only count the number of days between two dates and exclude holidays. I want to count the number of "S" in the range and if a "S" is entered on a weekend or holiday then it not to be counted. networkdays will not do this.
 
Upvote 0
Try this version

=SUMPRODUCT((WEEKDAY($J6:$NK6,2)<6)*($J10:$NK10="S")*(COUNTIF(Holiday,$J6:$NK6)=0))

....or it is possible to use NETWORKDAYS like this

=SUMPRODUCT(NETWORKDAYS($J6:$NK6+0,$J6:$NK6+0,Holiday)*($J10:$NK10="S"))
 
Last edited:
Upvote 0
help

count working days excel including weekends formula - =NETWORKDAYS(I7,J7) currently using this - but it won't count he weekends ! can you help me modify to include weekends please
 
Upvote 0
If you want to count all days just subtract one from the other, e.g.

=J7-I7

format result cell as number

Depending on your definition you may need to add 1 (is today until tomorrow 1 day or 2?)
 
Upvote 0
Re: hi Count work days only This gives me a minus figure tho ?

If you want to count all days just subtract one from the other, e.g.

=J7-I7

format result cell as number

Depending on your definition you may need to add 1 (is today until tomorrow 1 day or 2?)
hhh
 
Upvote 0
Re: hi Count work days only This gives me a minus figure tho ?

This is giving a minus figure
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top