Autofilling a formula, is that possible?

限于喜欢 提交于 2019-12-07 09:47:30

Your formula for first row to autofill directly can be:

=AVERAGE(OFFSET(A$1,26*(ROW(1:1)-1),0,26))

With data in column A, in B1 enter:

=AVERAGE(INDIRECT("A" & 26*(ROW()-1)+1 & ":A" & ROW()*26))

and copy downwards. This is equivalent to inserting:

=SUM(A1:A26)
=SUM(A27:A52)
=SUM(A53:A78)
=SUM(A79:A104)
=SUM(A105:A130)
=SUM(A131:A156)
=SUM(A157:A182)

but without having to adjust each formula.

This avoids volatile function like INDIRECT and OFFSET

In B1,

=AVERAGE(INDEX(A:A,(ROW(1:1)-1)*26 + 1):INDEX(A:A,(ROW(1:1)-1)*26 + 26))

The data is in column A

The *26 is the spacing

The + 1 is the first cell that has the data, so if the data starts in row two change it to + 2

The + 26 is the last row of the first group, so again if the data starts on row 2 then it should change to + 27

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!