I want to sum every 7 rows in a worksheet and put the sum in different column & rows

孤者浪人 提交于 2019-12-19 06:57:44

问题


I have never really used Excel before but this seems like it should be possible.

I have an ongoing document where I will be adding values every day, but what I want it to do for every 7 rows I want it to sum those values and add the sum of the 7 rows to a different column/row, e.g.,

Row B7:B14 Sum in D12
Row B15:B22 Sum in D13

And then when I start adding data into B23 I want it to add the sum to D14.


回答1:


In D12, put

=SUM(OFFSET($B$7,(ROW()-12)*8,0,8,1))

and fill down column D as far as you want. Note that B7:B14 is really 8 rows, not 7. If you really want 7 rows (B7:B13), then change the two 8's to 7's in the formula.



来源:https://stackoverflow.com/questions/3680350/i-want-to-sum-every-7-rows-in-a-worksheet-and-put-the-sum-in-different-column

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