Is this an expected behaviour that month(ref) returns 12 when the ref is an empty cell?

I would have thought that this is a serious bug. Am I correct?

No mention of that behaviour in the official docs: https://support.google.com/docs/answer/3093052?hl=en

enter image description here

1 Answer 1


In fact, yes it is expected behavior. All of the time/date based formulas default to lowest/highest value when there is no real reference.


To prevent it, you are supposed to perform a simple logic check for real data:

=IF(LEN(A1), MONTH(A1), )
=IF(A1<>"", MONTH(A1), )

Also, Google Documentation is way too empty!

  • 1
    Excellent answer
    – matcheek
    Commented Jun 3, 2019 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.