Are the numbers (1, 2, ... 11, etc) in the headers too?
Assuming they are not, and that you just are indicating to us the column numbers,
then something like:
=SUM(J2:INDEX(J2:N2,MATCH(A$1&" "&YEAR(TODAY()),$J$1:$N$1,0)-1))
this will sum the values in row2 starting from J2 and ending 1 column before the indicated quarter in A1 and current year.
formula can be copied down to get sums of next rows...
See attached.
Bookmarks