Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Spreadsheet SUMIF Date Comparison

I'm trying to get this aggregate date comparison working, and I thought I understood the syntax, but it's clearly not working. Can anyone correct the formula for me?

I'm trying to sum up the amounts in column I, where the date in H is prior to the date in A

My formula is =SUMIF(H$2:H,H$2:H<A4, I$2:I)

enter image description here

like image 719
Tom Halladay Avatar asked Nov 13 '12 19:11

Tom Halladay


People also ask

Can you use Sumif with dates Google Sheets?

Sum Data by a Date Range The SUMIFS Function sums data that meet certain criteria. In this example, we sum Planned Deliveries if their Date is between 1/31/2021 and 4/17/2021, inclusive. To start, we've hard-coded the dates directly into the SUMIFS Function using the DATE Function.

How do I compare two dates in Google Sheets?

DATEDIF is a Google Sheets function that calculates the difference between two dates. This function can return the difference value in years, months, or days. With the proper parameters, DATEDIF can also return the months and days difference with various quirks, such as ignoring the year difference.


1 Answers

Just a small error with your SUMIF syntax:

=SUMIF(H$2:H;"<"&A4;I$2:I)

like image 73
AdamL Avatar answered Sep 27 '22 19:09

AdamL