怎样在Excel中每隔N列求和?
时间:2023-12-16 01:51:19
有时我们需要在Excel中对一行数值每隔N列求和,假如有20列数据,位于F6:Y6区域中,可以使用下面的数组公式:
从第6列开始,每隔3列求和,即求出第6、9、12、……列的和:
=SUM(IF(MOD(COLUMN(F6:Y6),3)=0,F6:Y6,0))
或:
=SUM(IF(MOD(TRANSPOSE(ROW(1:20)),3)=1,F6:Y6,0))
以上两个公式为数组公式,输入完毕后按Ctrl+Shift+Enter结束。如果要求出每隔2列的和(隔列求和),只须将上述公式中用红色标出的数字“3”改为数值“2”即可。
如果不使用数组公式,可以用SUMPRODUCT函数。如上述公式可改为:
=SUMPRODUCT((MOD(COLUMN(F6:Y6),3)=0)*F6:Y6)
或:
=SUMPRODUCT(–(MOD(COLUMN(F6:Y6),3)=0),F6:Y6)
标签:公式,数组,每隔,求和,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
已经是管理员了提示没有管理员权限win10解决方法
2022-01-22 06:37:09
![](https://img.aspxhome.com/file/2023/1/a282456_0s.jpg)
如何快速切换百度输入法的繁体字
2023-03-16 12:48:49
![](https://img.aspxhome.com/file/2023/5/a317958_0s.png)
wegame英雄联盟辅助功能失效怎么办?
2022-07-21 09:36:23
![](https://img.aspxhome.com/file/2023/30/a264154_0s.jpg)
ps怎么给文字添加橙色纹理化效果?
2022-10-19 10:25:34
![](https://img.aspxhome.com/file/2023/7/a328936_0s.jpg)
word文章怎么设置标题样式?
2022-10-30 06:17:49
![](https://img.aspxhome.com/file/2023/8/23268_0s.png)
苹果Mac App实用软件推荐,打造高效工作流程!
2022-08-02 02:22:41
![](https://img.aspxhome.com/file/2023/1/a209831_0s.jpeg)
Win10系统怎么把网速调到最快?
2023-06-04 07:05:04
![](https://img.aspxhome.com/file/2023/1/a280341_0s.png)
CAD迷你看图如何将图片转为PPT?
2023-10-28 09:15:34
![](https://img.aspxhome.com/file/2023/7/a329212_0s.jpg)
word删除页眉页脚顶端底端横线的方法介绍
2023-05-01 21:49:08
![](https://img.aspxhome.com/file/2023/4/27204_0s.jpg)
2021显卡算力是NVIDIA好还是AMD好?NVIDIA与AMD显卡算力排行表介绍
2022-04-25 07:21:37
![](https://img.aspxhome.com/file/2023/6/a324555_0s.jpg)
excel如何画斜线
2022-06-04 11:00:57
Win7系统电脑显示器屏幕闪屏的解决办法
2022-12-06 21:57:13
![](https://img.aspxhome.com/file/2023/3/a299824_0s.jpg)
excel怎么设置行间距和列间距
2022-03-30 08:26:13
word排版前面的段落和后面的对不齐怎么回事
2023-11-29 17:06:14
![](https://img.aspxhome.com/file/2023/3/18243_0s.png)
Mac不能隔空投送怎么办?Mac隔空投送失败的解决方法分享
2022-03-03 03:04:44
![](https://img.aspxhome.com/file/2023/6/a215736_0s.png)
win7笔记本连接投影仪将画面投放在投影仪画布上面
2023-06-27 15:07:43
![](https://img.aspxhome.com/file/2023/29/a254141_0s.png)
腾讯视频如何登录别人的会员账号-腾讯视频登录别人的会员账号方法
2022-12-09 09:10:13
![](https://img.aspxhome.com/file/2023/4/a306174_0s.png)
怎么打开2345安全卫士的信任区 打开2345安全卫士的信任区的方法
2022-03-12 11:38:19
![](https://img.aspxhome.com/file/2023/8/a338196_0s.jpg)
ATM机转账怎么撤销?ATM机转账撤销教程
2022-06-14 14:49:17
![](https://img.aspxhome.com/file/2023/3/a297096_0s.jpg)
Win11休眠无法唤醒怎么办?Win11休眠无法唤醒的解决方法
2023-03-31 15:37:10
![](https://img.aspxhome.com/file/2023/1/a274801_0s.jpg)