Search code examples
excelrangeaverageoffset

How do you average repeating blocks of cells in Excel?


I am trying to figure out how to average 4 x 4 groups of cells in my spreadsheet across a very large data set. I've tried using OFFSET with a cell range (e.g. B2:E5) but I haven't had success (I don't even know if you can use a range for the reference with OFFSET). This is my first time tackling a problem like this, so any advice would be welcome! A portion of the data set is attached to give an idea of the ranges I would like to average.

enter image description here


Solution

  • If the data was in B2:Q17 you could use this complicated looking formula to return the average for each 4*4 block.

    =AVERAGE(INDEX($B$2:$Q$17,(ROWS($2:2)-1)*4+1,(COLUMNS($R:R)-1)*4+1):INDEX($B$2:$Q$17,(ROWS($2:2)-1)*4+4,(COLUMNS($R:R)-1)*4+4))
    

    You would copy this across and down and it could go anywhere on a sheet.

    enter image description here