Hi!
False alarm on non-parallel SUMPRODUCT ranges. The formula does work as
described but note that the list of Holiday dates should not include Fridays
unless you want to extend the formula using:
=NETWORKDAYS(A1+1,A2+1,HolidayRange)-SUMPRODUCT(--(HolidayRange>=A1),--(Holi
dayRange<=A2),--(WEEKDAY(HolidayRange)=1))+SUMPRODUCT(--(HolidayRange>=A1),-
-(HolidayRange<=A2),--(WEEKDAY(HolidayRange)=6))
The NETWORKDAYS element calculates the days excluding Fridays and Saturdays.
The first SUMPRODUCT element deducts from that any Public Holidays that fall
on a Sunday which would otherwise be excluded from the count.
The second SUMPRODUCT element adds back any Fridays that have been listed in
the HolidayRange because they would otherwise be double-deducted.
I think that the formula can probably be made a bit more efficient but at
this stage I have concentrated on getting the logic correct.
--
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.