counting working days in specific months between two dates

RUDYTX

New Member
Joined
Apr 9, 2015
Messages
9
Hello!

I need to calculate the number of working days (no Saturdays and Sundays) between two given dates, but i would like to exclude the working days from June, July, August, and December.


A1 is the start range 10/1/13
B1 is the end range 4/3/2015

Thanks for your help!!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
This you can do manually as you want to ignore the month June, July, August and December of each year.

Cell Formulas
RangeFormula
C1=A1
C2=IF(C1=0,0,IF(C1=$B$1,0,C1+1))
C3=IF(C2=0,0,IF(C2=$B$1,0,C2+1))
C4=IF(C3=0,0,IF(C3=$B$1,0,C3+1))
C5=IF(C4=0,0,IF(C4=$B$1,0,C4+1))
D1=IF(C1=0,0,TEXT(C1,"DDDD"))
D2=IF(C2=0,0,TEXT(C2,"DDDD"))
D3=IF(C3=0,0,TEXT(C3,"DDDD"))
D4=IF(C4=0,0,TEXT(C4,"DDDD"))
D5=IF(C5=0,0,TEXT(C5,"DDDD"))
E1=IF(C1=0,0,IF(MONTH(C1)=6,0,IF(MONTH(C1)=7,0,IF(MONTH(C1)=8,0,IF(MONTH(C1)=12,0,IF(D1="Saturday",0,IF(D1="Sunday",0,1)))))))
E2=IF(C2=0,0,IF(MONTH(C2)=6,0,IF(MONTH(C2)=7,0,IF(MONTH(C2)=8,0,IF(MONTH(C2)=12,0,IF(D2="Saturday",0,IF(D2="Sunday",0,1)))))))
E3=IF(C3=0,0,IF(MONTH(C3)=6,0,IF(MONTH(C3)=7,0,IF(MONTH(C3)=8,0,IF(MONTH(C3)=12,0,IF(D3="Saturday",0,IF(D3="Sunday",0,1)))))))
E4=IF(C4=0,0,IF(MONTH(C4)=6,0,IF(MONTH(C4)=7,0,IF(MONTH(C4)=8,0,IF(MONTH(C4)=12,0,IF(D4="Saturday",0,IF(D4="Sunday",0,1)))))))
E5=IF(C5=0,0,IF(MONTH(C5)=6,0,IF(MONTH(C5)=7,0,IF(MONTH(C5)=8,0,IF(MONTH(C5)=12,0,IF(D5="Saturday",0,IF(D5="Sunday",0,1)))))))
A4=SUM(E1:E1000)


Regards
 
Upvote 0
One way would be to use a regular NETWORKDAYS function, but list all June, July, August and December dates within the required period and use that range as the holiday range in NETWORKDAYS, so all those months would be excluded.

alternatively you can use this formula without needing to list any dates

=SUMPRODUCT((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)<6)*ISNA(MATCH(MONTH(ROW(INDIRECT(A1&":"&B1))),{6,7,8,12},0)))

where start date is in A1 and end date in B1
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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