Forum Discussion
ROB_N375
Dec 02, 2025Copper Contributor
Formula help - why doesn't this work for January dates please?
Hi, I was kindly given this formula to count when a month occurs across two columns. For some reason it comes up with a random total for the month of January, and I don't know how to resolve it. the ...
NikolinoDE
Dec 02, 2025Platinum Contributor
A few things can cause MONTH() to return unexpected results, but there is one very common cause specifically for January.
The formula only works correctly if every value in the two ranges is a real Excel date.
If any cell contains:
- text that looks like a date,
- a blank that Excel interprets as 0,
- a zero value,
- or anything non-date,
then:
MONTH(0) returns 1
…which Excel interprets as January.
So any blank or invalid date will be counted as January — giving you an incorrect total.
In one formula:
=SUMPRODUCT((ISNUMBER('Andy''s Team'!E2:E32))*(MONTH('Andy''s Team'!E2:E32)=12)
+(ISNUMBER('Andy''s Team'!H2:H32))*(MONTH('Andy''s Team'!H2:H32)=12))
This counts only real dates and ignores blanks/text.
I hope it helps them.