Welcome to the forum.

In an unused column starting in row 2, =AVERAGE(B2:INDEX(B2:BA2, $A$1))