This helps a LOT! It at least provides me a way to figure it out,
but....perhaps if I am a bit more clear in my needs, you have a calculation
that does ALL the work:
I am trying to determine whether to subtract a holiday from a schedule of
classes. There is a definite start date & a definite end date for each class
(which varies from class to class) - there is one class per row.
Some classes are only on Thursdays; some are on Mondays & Wednesday, etc.
which are indicated in columns H thru K, e.g., M _ W _ (or) _ T _ R.
If any of my holidays fall on a scheduled day, I need to subtract them from
my final count of class sessions, summed up in column P with this formula:
=IF(COUNT(N5:O5)<>2,"",SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(N5&":"&O5)),2)=MATCH(H5:K5,{"M","T","W","R","F","SA","SU",0},0))))
I will want to approach this by showing, in a separate column, not yet
created for each line how many of the scheduled days are holidays,, then
subtract that from column P. I transposed my column of holidays (U3
through U10) to column headings (X2 through AD2) and used your formula,
replacing the "phrases" with 1 (between) or 0 (outside). However, doing so,
I still have to determine whether it corresponds to an appropriate day of the
week.
For this semester I have eight holidays, three Mon., one Tues., one Wed.,
one Thurs., and one Fri.
(you can probably guess that I did not come up with the above formula. I
got it from one of your brilliant coterie of MVPs)
thanks for being here!