Networkdays

D

Dave

I know the networkdays automatically calculates the monday to friday
routine between two dates. How can I howether compare two dates that
doesn't count friday as a workday also, as well as the normal saturday
and sunday?
 
B

Bob Phillips

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(start_date&":"&end_date)),2)={1,2,3,4}))
-SUMPRODUCT(--(COUNTIF(holidays,(ROW(INDIRECT(start_date&":"&end_date)))*(WEEKDAY(ROW(INDIRECT(start_date&":"&end_date)),2)={1,2,3,4}))))

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
D

daddylonglegs

If you aren't worried about holidays

=SUM(INT((8-WEEKDAY(end_date-{1,2,3,4})+end_date-start_date)/7))

If you have a range of holidays to exclude

=SUMPRODUCT((WEEKDAY(ROW(INDIRECT(start_date&":"&end_date)),2)={1,2,3,4})*(COUNTIF(holidays,ROW(INDIRECT(start_date&":"&end_date)))=0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top