Workday function including sat, excluding sun

  • Thread starter Thread starter Handyy
  • Start date Start date
H

Handyy

Hi,

I'm trying to create a function which would calculate estimated
kilometers driven. Our trucks will stop only for sundays so there comes
my WORKDAY-function problem.

If I have example dates:
1.1.2006 - 31.1.2006 = 26 truck workdays

How can I get that result with workdays function, saturdays included
but bank holidays excluded?

Thanks in advance :)
 
If you're trying to calculate the number of workdays between 2 dates the
function you need is NETWORKDAYS not WORKDAY. To count weekdays and
Saturdays

=NETWORKDAYS(A1,B1,holidays)+INT((WEEKDAY(A1)+B1-A1)/7)

where A1 contains start date and B1 end date and holidays is a named
range containing (weekday) holiday dates
 
might want to cater for Saturday holidays

=NETWORKDAYS(A1,B1,holidays)+INT((WEEKDAY(A1)+B1-A1)/7)-
SUMPRODUCT(--(WEEKDAY(A1:A20))=7,--ISNUMBER(MATCH(A1:A20,holidays,0)))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"daddylonglegs" <[email protected]>
wrote in message
news:[email protected]...
 
Back
Top