If Saturday and Sunday cells are empty or must also be included...
Control+shift+enter, not just enter:
=SUM(IF(A2:A4="Task1",F2:AU4))
Another but undesirable option is...
=SUMPRODUCT((A2:A4="Task1")*F2:AU4)
If you need to exclude Saturdays and Sundays...
Control+shift+enter, not just enter:
=SUM(IF(A2:A4="Task1",IF(1-ISNUMBER(MATCH(TEXT(F1:AU1,{"Sat","Sun"},0)),F2:AU4)))