简体   繁体   English

基于日期范围的条件Excel总和

[英]Conditional Excel Sum based on dates range

I have got a spreadsheet in where dates are in column B and values are in column E. 我有一个电子表格,其中日期在B列中,值在E列中。

Dates are with the format: dd/mm/yy Values are with the format: XXX,XX€ 日期格式为:dd / mm / yy,值格式为:XXX,XX€

I am trying to sum cells based on dates but I can't. 我试图根据日期对单元格求和,但是我不能。

I am using the function SUMIFS like this to calculate the values from November: 我正在使用像这样的函数SUMIFS从11月开始计算值:

=SUMIFS(E9:E1000;B9:B1000;">="DATE(2014;11;1)&"<="DATE(2014,11,30))

I am doing something wrong but I don't know what. 我做错了事,但我不知道该怎么办。

In order to get the conditional Sum for specified date range (Nov 2014), correct your syntax as shown in the sample below: 为了获取指定日期范围内的条件总和(2014年11月),请更正语法,如下例所示:

=SUMIFS(E9:E1000,B9:B1000,">="&DATE(2014,11,1), B9:B1000,"<"&DATE(2014,12,1))

Note: this solution is pertinent to the US date format: mm/dd/yyyy, so you may need to correct it per your case depends on how DATE() function is set on your PC. 注意:此解决方案与美国日期格式有关:mm / dd / yyyy,因此您可能需要根据具体情况更正它,具体取决于PC上DATE()函数的设置方式。 Also, due to my regional settings it's using a comma-separator, which may be different from the one on you PC (you may need to use semicolon ; ). 另外,由于我的区域设置,它使用的是逗号分隔符,这可能与PC上的逗号分隔符不同(您可能需要使用分号; )。

Hope this will help. 希望这会有所帮助。 Kind regards, 亲切的问候,

也许:

=SUMPRODUCT(--(B9:B1000>=DATE(2014,11,1))*(B9:B1000<=DATE(2014,11,30))*(E9:E1000))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM