It's not clear to me if the lists in J & L will only ever contain dates that appear within the time frame specified in C2:C3
What adds to the confusion is you state "weekly offs" as being Sun, Sat & Tue (D2:D4) yet list Dates of those weekdays in the Overtime Dates, eg: Tue 23-Nov-10 has overtime assigned yet supposedly Tues is not a working day.
Ignoring the weekly offs and assuming that J & L will not always contain dates within the specified window:
=SUMPRODUCT(ISNA(MATCH(ROW(INDIRECT($C$2&":"&$C$3)),$J$2:$J$6,0))+0,LOOKUP(WEEKDAY(ROW(INDIRECT($C$2&":"&$C$3))),$E$2:$E$8,$H$2:$H$8-$G$2:$G$8-$I$2:$I$8))+SUMIFS($N$2:$N$7,$L$2:$L$7,">="&$C$2,$L$2:$L$7,"<="&$C$3)
the above format as [hh]:mm would return 230:30 for the data provided but again to repeat this does not account for "Weekly Offs" given the aforementioned ambiguity.
In effect we need to know whether or not a date listed as having overtime overrides the Weekly Off constraint or vice-versa.
Bookmarks