Google-sheets – Checking Between Two Dates using SUMIFS

google sheets

I am using SUMIFS to sum values based on various criteria. So the following formula gives me a sum of all values in column D that are greater than zero.

=SUMIFS(D:D, J:J, "Bob", K:K, "Smith", D:D, ">0")

I now want to add in a criteria to check if a date value in Column A is within a certain date range. eg something like this:

=SUMIFS(D:D, J:J, "Bob", K:K, "Smith", D:D, ">0", A:A, AND(">05/04/2017", "<06/04/2018"))

That doesn't work though. Any ideas how to incorporate that date check?

Best Answer

It doesn't work because ">05/04/2017" isn't by itself a logical expression, it's only a criterion. Consider it an inconsistency inherited from excel.

Instead just respecify as needed.

=SUMIFS(D:D, 
J:J, "Bob", 
K:K, "Smith", 
D:D, ">0", 
A:A, ">05/04/2017", 
A:A, "<06/04/2018")