logo
search
Formula Errors

How to Fix Excel Formula Errors When Dates Are Stored as Text

WPS EditorWPS Editor Oct 9, 2026 869 views

Question details

The user needs to troubleshoot and fix an Excel formula that returns an error because a referenced date is stored as a text string instead of a valid date serial number.

How to Fix Excel Formula Errors When Dates Are Stored as Text
Product
Excel
Device & OS
not provided
Scenario
Calculating formulas involving dates where the referenced date cell is not recognized as a valid serial number.
Observed behavior
The formula fails or returns an error because Excel treats the date as a text string. Changing the cell formatting to Date does not resolve the issue or alter the underlying text value.
Before you start

Before attempting conversions, widen your spreadsheet column to ensure the cell isn't simply displaying '####' due to a narrow column width, and locate the exact cell causing the formula calculation error.

Solution 1Recommended

Use the DATEVALUE Function to Convert Text

Use the built-in DATEVALUE formula to force Excel to convert the date-like text string into a readable date serial number.

Excel needs dates to be stored as serial numbers to perform calculations. When a date is stored as text, standard formulas break. The DATEVALUE function extracts the text and translates it into the serial number Excel requires.

1
Select an empty cell

Click on a blank cell adjacent to the cell containing your text-formatted date (e.g., cell J2).

2
Enter the DATEVALUE formula

Type =DATEVALUE(J2) into the formula bar and press the Enter key.

3
Format as a Date

The result will appear as a 5-digit number (like 44000). Select the cell, go to the Home tab, click the Number Format dropdown, and choose Short Date.

4
Update your original formula

Modify your failing formula to reference this newly created date cell instead of the original text cell.

Use the DATEVALUE Function to Convert Text
Pro Tip: You can also nest the DATEVALUE function directly inside your existing formula, for example: =A2-DATEVALUE(J2).
Solve Date Errors with WPS Spreadsheet

Easily Manage Date Formats and Formulas with WPS Spreadsheet

WPS Spreadsheet provides highly intuitive data management tools to instantly convert text to dates and calculate complex formulas without errors. It offers a familiar interface, ensuring you can fix data formatting issues without a steep learning curve.

  1. 1. Open your file in WPS Office: Launch WPS Spreadsheet and open the document containing the date errors.
  2. 2. Select the text dates: Highlight the cells or the specific column where dates are stored as text.
  3. 3. Use Data conversion tools: Navigate to the Data tab and use the Text to Columns feature to instantly convert the selection into valid date serial numbers.
Instantly convert text to dates with robust Text to Columns tools100% compatible with Microsoft Excel formats (.xlsx, .xls)Built-in DATEVALUE and advanced formula error-checking capabilitiesFree, lightweight, and fast performance for large datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why does changing the cell format to 'Date' not fix my text date?

Formatting only changes how a valid underlying value is displayed. If Excel has already saved the data as a literal text string, applying a Date format over it won't retroactively translate that string into a readable date serial number. You must use conversion tools like DATEVALUE or Text to Columns.

What is an Excel date serial number?

Excel stores dates as sequential serial numbers so they can be easily added and subtracted in formulas. By default, January 1, 1900, is serial number 1. A date like January 1, 2024, is stored as 45292. Proper dates will reveal this underlying number when formatted as 'General' or 'Number'.

How can I quickly visually check if dates are stored as text?

By default, Excel left-aligns text and right-aligns numbers (including dates). If you haven't applied custom alignment to your cells and your dates are clinging to the left side of the cell, they are likely stored as text.