your EOWEEK formulas have a right parenthesis wronly placed.
here is the first formula corrected and working:
=IF(AND(INDEX(Q2:Q27,MATCH(C6,P2:P27,0))="EOWEEK",6-WEEKDAY(C4)>=1),C4+6-WEEKDAY(C4),"")