Let me recap:
A2 = Sun 23-May-2004
D2 = Sun 23-May-2004
Weekdays to exclude: Mon and Sun [ {2,1}, by WEEKDAY(Date) ]
Holidays: The same set as before.
{=NETWORKDAYS(A2+2,D2+2,Holidays+2)} gives 1, while
=SUMPRODUCT(--(COUNTIF(Holidays,ROW(INDIRECT(A2&":"&D2)))=0),--ISNA(MAT
CH(WE
EKDAY(ROW(INDIRECT(A2&":"&D2))),{2,1},0)))
calculates 0.
A2 = Sun 23-May-2004
D2 = Mon 24-May-2004
Weekdays to exclude and Holidays: Same as above.
{=NETWORKDAYS(A2+2,D2+2,Holidays+2)} gives 2, the SumProduct formula
0.
Make D2 Tue 25-May-2004, we get 3 vs 1.
Am I missing something here?
Frank Kabel said:
Hi Aladin
in this case (if I understood you correctly) I got the following
results:
1. Your formula: 1
2. My formula: 0
I think zero is the correct result in this case as both dates should
have been excluded.
--
Regards
Frank Kabel
Frankfurt, Germany
Aladin Akyurek wrote:
Interesting, though it flounders on:
A2 = Sun 23-May-04, D2 = Mon 24-May-04, and days to exclude are Mon
and Sun, that is {1,7},
while the Holidays set is the same as in my previous post.
Hi aladin
good point: You're correct, my suggestion works only if no holiday
list is included!
--
Regards
Frank Kabel
Frankfurt, Germany
Aladin Akyurek wrote:
=SUMPRODUCT(--(COUNTIF(Holidays,ROW(INDIRECT(A2&":"&D2)))=0),--ISNA(MAT
CH(WE
EKDAY(ROW(INDIRECT(A2&":"&D2))),{5,6},0)))
where A2 < D2.
When A2 = Sun 23-May-04, D2 = Sun 13-Jun-04, and Holidays
consists of:
Fri 28-May-04
Sat 29-May-04
Sun 30-May-04
Sat 5-Jun-04
Sun 6-Jun-04
Mon 7-Jun-04
the above formula gives a count of 11, while 14 by the formula
Frank suggested.
[...]