I created a table out of your data on the Calendar worksheet, created names from the headers and inserted helper columns E and H (these would have to be repeated for each person)
This is entered in Calendar!E2 and filled down. The equivalent is filled in all the helper columns with the proper reference changes.
Formula:
=IF(SUMIF(F$2:F2,"Employee Illness",G$2:G2)<=40,0,IF(AND(NOT(ISBLANK(F2)),F2<>F1),1,0))
Enter in Summary!G7 and fill down
Formula:
=SUMIFS(OFFSET(INDIRECT(SUBSTITUTE(A7,", ","__")),,2),Table1[Date],"<"&$B$4,Table1[Date],">="&EDATE(SUMMARY!$B$4,-12))
The INDIRECT(SUBSTITUTE(A7,", ","__")) uses the name on the summary worksheet and converts it to match the names in the header of the Table on CALENDAR worksheet.
Bookmarks