How to check if a cell contains a date in Excel
Formula (Excel and Google Sheets)
=ISNUMBER(A2)Real dates are numbers, so =ISNUMBER(A2) is TRUE for a date and FALSE for text that only looks like one.
- Result on the example
- one result per row in
B2, filled down toB7 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in B2, filled down to B7. Change any input and the result updates, or edit the formula to experiment.
How it works
Spreadsheets store real dates as numbers, so ISNUMBER is TRUE for them and FALSE for text that only looks like a date, such as "3/9/2026" imported as text, or an impossible date like "2026-13-01".
=ISNUMBER(A2)ResultTRUE
A23/5/2026The value in A2.
ISNUMBER(A2)TRUEISNUMBER: TRUE if the value is a number.- value
A23/5/2026
- value
In Google Sheets
The same formula works in Google Sheets: =ISNUMBER(A2). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =IF(ISNUMBER(A2),"Date","Not a date") | Date, Not a date, Date…Different result | A readable label. Shows Date or Not a date. |
| =AND(ISNUMBER(A2),A2>=DATE(2000,1,1),A2<=DATE(2100,12,31)) | TRUE, FALSE, TRUE… | Also rejects numbers that are too small or large to be dates in your data, like 42. |
Common mistakes
- Any number passes ISNUMBER, including 42 or a price. Add a range check when the column can hold other numbers.
- Excel has no ISDATE function. CELL("format",A2) returns a code starting with "D" for date-formatted cells, but it checks only the format, not the value.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Check if a cell contains a date
B2, return TRUE if A2 holds a real date and FALSE if it holds text, and fill down to B7.Questions
How do I convert the text dates?
=IF(ISNUMBER(A2),A2,DATEVALUE(A2)).
How do I highlight cells that aren't real dates?
Use conditional formatting with the rule =NOT(ISNUMBER($A2)).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.