In the attached example-table I have person's names and then a set of data that takes on 4 columns and repeats. The only thing that changes in the data is the first field "Type" and the numbers. As suggested in the example itself, I would like to put in column "Average ALs" the average of all the fields "Points" where "Type"="AL". Accordingly for the other types "M" and "T". The table will expand with time, so that the averages will not stay in columns T, U and V as they are now.

What is the formula to calculate the averages based on the content of field "Type" and looking every 4 columns?