View Single Post
  #10   Report Post  
Daniel.M
 
Posts: n/a
Default


Hi,

=SUMPRODUCT((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)={ 1,2,3,4})*(1-ISNUMBER(M
ATCH(ROW(INDIRECT(A1&":"&B1)),C1:C10,0))))


FWIW, in cases where the holidays range has a lot fewer dates than
ROW(INDIRECT(A1&":"&B1)), this array formula:

{=SUM(INT((B1-WEEKDAY(B1+1-{2;3;4;5;6})-A1+8)/7))-COUNT(MATCH(WEEKDAY(holidays),
{2;3;4;5;6},0)+MATCH(holidays,ROW(INDIRECT(A1&":"& B1)),0))}

As for the previous formula, you can adapt the constant array (twice in the
formula) to include whatever day of the week you whish to count.
Example: {2;4;6} counts only Mon,Wed,Fri

Regards,

Daniel M.