Formula Errors

How to Fix the Excel DATEVALUE and TODAY #VALUE! Formula Error

Nimra MalikNimra Malik Nov 11, 2026 869 views

Question details

The user needs to resolve a #VALUE! error occurring when attempting to subtract today's date from a specific cell using a formula combining SUM, DATEVALUE, and TODAY.

How to Fix the Excel DATEVALUE and TODAY Formula Error
Product
Excel
Device & OS
not provided
Scenario
Calculating the difference in days between a date value in a specific cell and the current date.
Observed behavior
The formula =SUM(DATEVALUE(G2))-TODAY() returns a #VALUE! error.
Before you start

Verify the exact format of your target cell (e.g., G2). The correct formula depends entirely on whether the cell contains a date formatted as a text string or a true Excel date serial number.

Solution 1Recommended

Correct the Formula for Text Dates

Remove the unnecessary SUM function and use DATEVALUE correctly if the target cell contains a date stored as text.

The SUM function is redundant when performing simple subtraction. If your date is stored as text, you only need to convert it using DATEVALUE and then subtract TODAY().

1
Select the error cell

Click on the cell displaying the #VALUE! error to make it active.

2
Edit the formula

Click into the Formula Bar at the top of the window and delete the existing =SUM(DATEVALUE(G2))-TODAY() formula.

3
Enter the corrected formula

Type =DATEVALUE(G2)-TODAY() and press the Enter key to calculate the result.

Correct the Formula for Text Dates
When to use DATEVALUE: The DATEVALUE function is specifically designed to convert a date represented as a text string into an Excel date serial number. If it is used on a cell that already contains a real date, it will trigger a #VALUE! error.
Calculate Dates Error-Free

Easily Manage Date Formulas with WPS Spreadsheet

WPS Spreadsheet provides powerful date calculation tools, intelligent formula prompting, and excellent error tracing. Easily find and fix formula issues like the #VALUE! error without the hassle.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your date calculations.
  2. 2. Use formula prompts: Select a blank cell, type '=', and start typing 'DATEVALUE'; WPS will display a helpful syntax guide.
  3. 3. Calculate instantly: Enter =G2-TODAY() or =DATEVALUE(G2)-TODAY() depending on your cell format, and press Enter to get the result.
100% compatibility with Microsoft Excel date functions and formula syntax.Intelligent error-checking to quickly identify syntax issues.Free, lightweight, and easy-to-use interface for managing complex data.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the DATEVALUE function return a #VALUE! error?

This error typically occurs if the referenced text is not in a recognized date format that matches your system settings, or if the referenced cell already contains a numeric date serial instead of a text string.

Do I need to use the SUM function when calculating the difference between two dates?

No, the SUM function is completely unnecessary for simple subtraction. You can directly subtract one date from another using the minus sign, such as =A1-B1.

How do I calculate the number of days until a future date?

Assuming the future date is a valid date located in cell A2, you can use the formula =A2-TODAY(). Ensure the cell where you enter this formula is formatted as a General number, not as a Date.