Thread moved to Office Development/VBA forum (note that the "VB Editor" in Office programs is actually VBA rather than VB)
The "overflow" error always means that the number is too big for the data type... and it is not surprising that it is occurring here, as that number is huge, certainly more than can be stored to a Date data type (which is part of what IsDate will check).
What I would recommend is trying to store the value to a Double instead (as it supports numbers that large), and/or see if that value is bigger than the largest Date allowed (I'm not sure if VBA has the same maximum as VB, but for VB it is #12/31/9999#).
eg:
..of course you could use a lower "maximum" date that makes more sense to you, as I doubt you have any valid data after the year 2099 or so!Code:If CDbl(Range("M" & curRow).Value) < #12/31/9999# Then 'valid date Else 'not a valid date End If




Reply With Quote