Sumif one column based on dates entered in cells

I have a list and would like to do a sumif based upon dates placed in cells.

This works:
=SUMIFS(F:F,A:A,">="&DATE(2024,1,1),A:A,"<="&DATE(2024,1,5))

I would like to do it along the line
=SUMIFS(F:F,A:A,">="&DATE(J2),A:A,"<="&DATE(J3))

I’ve entered the Dates as 1/1/2024, January 1, 2024, even 2024,1,1 and it’s not working.

Obviously I’m missing something basic.

Thx.

If J2 and J3 contain dates (and not texts representing dates), please try this:
=SUMIFS(F:F,A:A,">="&J2,A:A,"<="&J3)
A date is a number of days from Dec 31, 1899, so you simply need to compare numbers.

4 Likes

You can test it your dates are dates or just text by clicking View - Value highlighting. Dates and numbers will be blue, formulas will be green and text will be black.

This page will help you to convert text if needed, https://wiki.documentfoundation.org/Faq/Calc/How_to_convert_number_text_to_numeric_data/en

2 Likes

That works. Thx.

That was very interesting, and useful. So my dates were dates. :slight_smile: But it’s good to see what’s a number and what is a calculated field that looks like a number.