是否可以在 google 工作表中编写一个数组公式来增加单元格引用?

is it possible to write an array formula in google sheets that will increment cell referents?

我正在跟踪流量数据并记录 运行 新成员的数量,以及 运行 的平均值。

我目前正在做的是每天手动将公式添加到每个单元格,例如。 g.

avg. daily attrition avg. total attrition
=AVERAGE(E2:E3) =AVERAGE(H2:H3)
=AVERAGE(E2:E4) =AVERAGE(H2:H4)
=AVERAGE(E2:E5) =AVERAGE(H2:H5)
=AVERAGE(E2:E6) =AVERAGE(H2:H6)
(...) (...)
=AVERAGE(E2:E366) =AVERAGE(H2:H366)

我想要的是一个只将新平均值添加到最新单元格的公式,并且不影响旧单元格的先前平均值。因此,对整个列使用 =AVERAGE(E2:E366) 显然是正确的。

我确定有办法做到这一点,我只是不知道它是什么。我尝试查找数组公式,但根据 =ARRAY 的工作原理,我认为这不合适。

提前致谢。

预计到达时间:我找到了教程。谢谢你的回答。

尝试

=transpose(index(query(transpose(split(split(substitute(join("~",E2:E366),"~","#",sequence(rows(E2:E366))),"#"),"~")),"select avg(Col"&join("), avg(Col",sequence(rows(E2:E366)))&")"),2))

使用 transpose(split(split(substitute(join("~",E2:E366),"~","#",sequence(rows(E2:E366))),"#"),"~")) 我们正在创建一个 table 就像 C3:G8 中的那个:

"select avg(Col"&join("), avg(Col",sequence(rows(E2:E366)))&")" (C9) 我们 return 列中值的平均值。