Google Sheets – How to Sum Values in a Range of Dates

google sheets

I have a Google Spreadsheet in the format below — here's an example.

  • Column A → Dates
  • Column B → Numbers

I'd like to sum values ​​in column B in a range of dates in column A.


Example:

Sum values ​​between 01-feb-12 and 29-feb-12.

In Excel, I used the following formula:

=SUMPRODUCT(N(A1:A1000>=A35),N(A1:A1000<=A36),B1:B1000)

where:

  • A35 = Start Date
  • A36 = Last date

Best Answer

This works, see F35 in your sheet:

SUMIF(E2:E33;">="&E35;B2:B33)-SUMIF(E2:E33;"<="&E36;B2:B33)

column E is done by calculating a value for the dates to be able to compare them (=VALUE(E1))

Note that separating the args for some reasons is done with ;