用数据透视表out了!这3个 “按月汇总” 的Excel公式更实用
时间:2023-11-19 08:41:41
今天学习的内容更贴近实用,是一个根据销售明细按月汇总的excel公式设置技巧。
【例】如下图所示,AB列是销售明细表。要求在右侧的月份汇总表中设置公式,计算出每个月的时时销售额。
方法1: 使用sumifs函数(适用于2007及以上版本)
=SUMIFS(B:B,A:A,”>”&DATE(2015,D2,0),A:A,”<“&DATE(2015,D2+1,1))
公式说明:
DATE(2015,D2,0) 用DATE函数生成当前月的第0天,即上个月的最后一天
DATE(2015,D2+1,1) 生成下个月的第1天。
方法2:使用SUMPRODUCT函数(适用于所有版本)
=SUMPRODUCT((MONTH(A$2:A$275)=D2)*B$2:B$275)
公式说明:
MONTH(A$2:A$275)用MONTH函数取出所有日期的天数。
方法3: 使用SUM函数(数组公式,适用于所有版本)
{=SUM((MONTH(A$2:A$275)=D2)*B$2:B$275)}
公式说明:
计算原理同方法2
本公式需要用数组形式输入,即按ctrl+shift+enter三键输入。
小编说: 如果考虑公式简捷易用,建议用Sumproduct函数公式,如果考虑计算速度,建议用sumifs函数公式。肯定会有同学说:为什么不用数据透视表呢?小编想说,如果方便用公式就不用数据透视表,因为数据透视表默认无法自动更新,如果有一天你把没更新的汇总结果给领导看,那后果……
标签:excel公式,excel数据透视表,Excel表格,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
SD卡写保护怎么去掉?
2022-02-18 01:20:40
![](https://img.aspxhome.com/file/2023/6/a325702_0s.jpg)
惠普笔记本电脑一键u盘启动详细教程
2022-01-15 22:26:22
![](https://img.aspxhome.com/file/2023/3/a295061_0s.jpg)
word怎么统计行数
2022-03-13 05:29:13
![](https://img.aspxhome.com/file/2023/0/34530_0s.gif)
win7系统Word文档添加和删除水印的方法
2022-06-15 15:26:41
![](https://img.aspxhome.com/file/2023/28/a245571_0s.jpg)
火狐浏览器改字体大小怎么改?火狐浏览器字体大小设置
2023-10-11 04:07:28
![](https://img.aspxhome.com/file/2023/30/a268313_0s.png)
Win10看不到局域网电脑且服务里没有Computer Browser怎么办?
2022-02-22 08:02:57
![](https://img.aspxhome.com/file/2023/26/a224461_0s.jpg)
Win7如何关闭USB存储设备?禁用USB存储设备的方法
2022-11-30 15:19:04
![](https://img.aspxhome.com/file/2023/27/a231557_0s.jpg)
PPSAP.exe是什么进程?PPSAP.exe会是病毒吗?PPSAP.exe程序文件及常见问题介绍
2023-10-04 06:37:02
![](https://img.aspxhome.com/file/2023/5/a319454_0s.jpg)
excel2013添加加载项的方法
2023-07-16 15:14:08
![](https://img.aspxhome.com/file/2023/6/40776_0s.jpg)
Win8.1系统下Office 2013序列号过期的解决方法
2023-01-02 11:46:24
![](https://img.aspxhome.com/file/2023/2/a286949_0s.jpg)
Win10怎么使用bat文件一键清理电脑系统垃圾?
2023-11-21 14:48:14
![](https://img.aspxhome.com/file/2023/7/50247_0s.png)
Win10电脑怎么知道有没有被远程控制?
2022-11-09 23:35:06
![](https://img.aspxhome.com/file/2023/26/a220594_0s.jpg)
如何在excel2019工作表中插入3D模型的操作方法
2022-07-12 04:28:41
![](https://img.aspxhome.com/file/2023/5/a140245_0s.jpg)
Win10开机速度慢的解决方法
2023-11-14 09:58:45
![](https://img.aspxhome.com/file/2023/26/a225956_0s.jpg)
Win7系统删除windows media center的图文教程
2022-09-20 03:50:06
![](https://img.aspxhome.com/file/2023/28/a243031_0s.jpg)
如何让excel单元格内日期只显示英文月份?
2023-10-11 17:03:02
Excel中怎么设置混合条件排序
2023-09-13 17:48:09
![](https://img.aspxhome.com/file/2023/2/37412_0s.png)
手把手教你重装Win11系统教程
2022-09-12 23:34:49
![](https://img.aspxhome.com/file/2023/1/a272751_0s.png)
利用表来实现对Excel数据命名及快速引用的方法
2022-10-25 18:36:37
foodie美食相机拍照时闪退怎么办?
2023-07-10 05:25:12
![](https://img.aspxhome.com/file/2023/8/a339946_0s.jpg)