1
votes

I have successfully managed to calculate the number of days in a specific month between two dates. However I need to calculate those days as work days within the formula. For example.

| ------------- A -------------------- B --------------- C
| 1 ------- 11/12/2014 ----- 17/03/2015 ----- 01/03/2015
| 2

A - Being the start date
B - Being the End date
C - Being the month to check the number of days range A1:B1 falls within. (In this case March)

=MAX(0,MIN(EOMONTH(C$1,0),$B1)-MAX(C$1,$A1)+1)

This should produce 17, which is the number of regular days. How can I produce the number of working days, and incorporate

=NETWORKDAYS()

Ultimately the answer should be 12.

Thanks in advance for your suggestions.

1

1 Answers

1
votes

How about this:

=NETWORKDAYS(MAX(A1,C1),MIN(B1,EOMONTH(C1,0)))

It might be wise to expand it with some error checking like so:

=IF(NETWORKDAYS(MAX(A1,C1),MIN(B1,EOMONTH(C1,0)))<0,0,NETWORKDAYS(MAX(A1,C1),MIN(B1,EOMONTH(C1,0))))