如何在Excel中的连续块中添加行? [英] How to add rows in consecutive blocks in excel?

查看:86
本文介绍了如何在Excel中的连续块中添加行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个示例excel列,如下所示:

I have a sample excel column as shown below:

上面的图像类似于单列长表.

The above image is a resemblance of a single column long table.

我想要做的是:计算连续块的逐块求和,如块大小3的颜色所示.目前,我手动进入每个块的第一行并使用=SUM(A<row_num>:A<row_num+3>).但这对于很长的专栏来说是乏味的.有没有一种自动方法可以在excel中计算这些公式?

What I want to do is: to calculate blockwise summation of consecutive blocks as shown by colors of block size 3. Currently, I am manually going to the top row of each block and using =SUM(A<row_num>:A<row_num+3>). But this is tedious for the very long column. Is there an automated way to calculate those formulas in excel?

推荐答案

您可以在B1中使用此公式并向下拖动:

You could use this formula in B1 and drag down:

1)-编辑之前-之间有空格:

1) Before edit - with whitespaces between sums:

=IF(MOD(ROW()+2,3)=0,SUM(INDEX(A:A,ROW()):INDEX(A:A,ROW()+2)),"")


2)编辑后-和之间没有空格:


2) After edit - without whitespaces between sums:

=SUM(INDEX(A:A,(ROW()*3)-2):INDEX(A:A,ROW()*3))



这篇关于如何在Excel中的连续块中添加行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆