Agree with Sambo kid on the merged cells.
Additionally the mixed date references cause havoc.
The SELPA for is a government form that cannot be changed.
With the understanding that other sheets may be altered:
One work around is to use a helper row in 'Class Attendance'. I inserted one in row 1. Then put a lookup table in JE2:JF13 to lookup months and month numbers. That streamlines the helper formula in E1:IZ1.
Formula:
=IF(ISNUMBER(E$3),DATE(--RIGHT(LOOKUP("zzz",$E$2:E$2),4),LOOKUP(1E+306,FIND($JE$2:$JE$13,UPPER(LOOKUP("zzz",$E$2:E$2))),$JF$2:$JF$13),E$3),"")
Then in 'SELPA Attendance Santa Rosa' cell F11 array enter this formula and fill across. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
Formula:
=IF(F$8="","",INDEX('Class Attendance'!$E$5:$IZ$19&"",MATCH(1,1/($B11='Class Attendance'!$A$5:$A$19)*('Class Attendance'!$C$5:$C$19="Santa Rosa"),0),MATCH(F$8,'Class Attendance'!$E$1:$IZ$1,0)))
The helper row and the lookup table can be hidden. The lookup table can even be moved to a different sheet.
You didn't ask for it, but is appears you could use another formula in the Total Student Attendance column (same sheet).
Formula:
=COUNTIF(F11:AD11,"P")
I also custom formatted the helper row m/d.
Bookmarks