Definitely, without that restriction you've had to examine every cell in the
holiday list, checking whether it's in the target range and that it's not a
Sunday. With 10-11 cells, that should be OK. With a longer list, IMO, that's
too slow, but it's certainly possible.
BTW, the code I've posted in the past to generate the holiday list given a
range of years, automatically moves a holiday that falls on Sat or Sun to Mon,
thus eliminating this problem before it starts <g>.
Another way to remove sunday holidays would be a helper column:
=IF(WEEKDAY(A2)=7,"",A2)
and specify the column with that formula as the holiday list.
Caveat: I haven't tried that to see if the builtin WEEKDAY and NETWEEKDAY
functions that use a holiday list will ignore "blanks" in the list.
A totally different approach to the original question is to use the built-in
NETWORKDAYS function and *add back* the number of Saturdays.
There have been formulas and VBA posted to count the number of a particular
weekday that occur in a timespan. In fact I just went to Google to look for
them, and I came up with a message from 2001, with code by me, and a formula
by Tom to calculate the number of Mondays. I haven't studied his formula hard
enough to know how to modify it to count Saturdays.
But if your holiday list includes Saturday holidays, you have the same problem
again.
Tom's formula to calculate number of Mondays, from 2001:
Here is a worksheet function I was playing around with - not polished, but
seems to work:
Start date in B3, End Date in B4
=IF(WEEKDAY(B3)=1,1,0)+INT((B4-B3)/7)+((MOD(B4-B3,7)+WEEKDAY(B3))>7)