Below is a possible solution for the challenge – Challenge 62 – Produce the Sum for Merged Cells Headers
Put following formula B14 and drag right and down
=SUM(OFFSET($A$1,ROWS($1:1),MATCH(B$13,$1:$1,0)-1,,IFERROR(MATCH(C$13,$1:$1,0),COUNTA($2:$2)+1)-MATCH(B$13,$1:$1,0)))