Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9786

different results for COUNTIFS on date range when using > vs. >=

$
0
0

I haven't quite been able to wrap my head around this one, but I've got a spreadsheet that is a simple list of dates, formatted thusly:

11/1/2022 0:12:5411/1/2022 6:45:4311/1/2022 7:13:15

... and so on

This covers from 11/1 to 11/30 and has 538 rows.

This formula gives me a count of 538 as expected:

=(COUNTIFS(A1:A, ">"&DateValue("10-31-2022"), A1:A, "<"&DateValue("12-1-2022")))

That is to say "dates greater than October 31 2022 and Less than December 1 2022" which represents the entirety of this dataset.

The following formula gives me 506 and I can't figure out why, because these should be functionally equivalent:

=(COUNTIFS(A1:A, ">="&DateValue("11-1-2022"), A1:A, "<="&DateValue("11-30-2022")))

Greater than or equal to November 1, and less than or equal to November 30.

That's the same thing isn't it?

"A" is formatted as Number->Date/Time.

I should note that this gives 538:

=(COUNTIFS(A1:A, ">="&DateValue("11-1-2022"), A1:A, "<="&DateValue("12-1-2022")))

There are 32 records with dates of 11/30/2022.


Viewing all articles
Browse latest Browse all 9786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>