Fix dates stored as text
=DATEVALUE(A2)Excel · result on the sample sheet: 6 rows (B2:B7)
Describe what you need and get a working DATEVALUE formula for Excel and Google Sheets, tested on real data before you copy it. DATEVALUE converts a date that is stored as text into a real date that Excel can sort, subtract and format.
Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.
=DATEVALUE(A2)Excel · result on the sample sheet: 6 rows (B2:B7)
=DATEVALUE(A2)Excel · result on the sample sheet: 6 rows (B2:B7)
=MONTH(DATEVALUE(A2&" 1"))Excel · result on the sample sheet: 5 rows (B2:B6)
=XLOOKUP(DATEVALUE(E1),A2:A8,B2:B8)Excel · result on the sample sheet: $4,560
=DATEVALUE(REGEXEXTRACT(A2,"\d{1,2}/\d{1,2}/\d{4}"))Google Sheets · result on the sample sheet: 5 rows (B2:B6)
=MAX(DATEVALUE(B2:B7))Excel · result on the sample sheet: 4/27/2026
=SORTBY(A2:C8,DATEVALUE(A2:A8))Excel · result on the sample sheet: 7 rows (E2:G8)
=IF(ISNUMBER(A2),A2,DATEVALUE(TRIM(A2)))Excel · result on the sample sheet: 6 rows (B2:B7)
You describe the task in plain English, and it writes the formula, using DATEVALUE where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.
DATEVALUE converts a date that is stored as text into a real date that Excel can sort, subtract and format.
Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the DATEVALUE function page has a practice exercise.