简体   繁体   中英

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.

Dates are with the format: dd/mm/yy Values are with the format: 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(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:

=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. 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 ; ).

Hope this will help. Kind regards,

也许:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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