How to Fix #VALUE! Error When Subtracting Text from TODAY in Excel
Question details
The user needs to fix a #VALUE! error that occurs during a date calculation when a source cell contains text instead of a valid date.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Performing date math, specifically subtracting the TODAY function from a cell reference that may contain text.
- Observed behavior
- The formula returns a #VALUE! error because the spreadsheet attempts to perform mathematical subtraction on a text string instead of a valid numeric date.
Identify the specific cells causing the #VALUE! error and ensure your spreadsheet's calculation mode is set to Automatic so that formula corrections apply immediately.
Use the ISNUMBER Function to Check for Valid Dates
Wrap your calculation in an IF and ISNUMBER statement to only perform the math on valid numeric dates, ignoring text entirely.
Excel stores dates as sequential numbers. When you try to subtract text from a date function like TODAY(), the application cannot process the calculation, resulting in a #VALUE! error. Using ISNUMBER prevents this by verifying the data type before running the math.
Click on the cell where you want to output your date calculation result.
Type =IF(ISNUMBER(F5),F5-TODAY(),"") into the formula bar (assuming F5 is your source cell). This formula calculates the difference only if F5 is a number, and leaves the cell blank if it contains text.
Press Enter to save the formula, then click and drag the fill handle (the small square at the bottom right of the cell) down to apply this error-proof formula to the rest of your data.

Use the ISTEXT Function as an Alternative
Check if the cell contains text first, and skip the calculation if text is detected.
Fix Date Formula Errors Easily in WPS Spreadsheet
WPS Office provides a highly compatible spreadsheet application that handles complex logical and date formulas identically to Microsoft Excel, enabling you to fix data errors seamlessly for free.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your existing Excel workbook containing the date formulas.
- 2. Locate the Error Cells: Find the column containing the #VALUE! errors caused by subtracting text from the TODAY function.
- 3. Apply the Logic Formula: Enter =IF(ISNUMBER(F5),F5-TODAY(),"") in the formula bar and press Enter to instantly eliminate the errors.

Frequently Asked Questions
Why does subtracting text from TODAY() cause a #VALUE! error?
The TODAY() function generates a numeric date value. Spreadsheet software cannot perform mathematical operations like subtraction between a number and a text string. Doing so triggers the #VALUE! error to indicate mismatched and invalid data types.
Why can't I use ISBLANK to fix this date calculation error?
The ISBLANK function only returns TRUE if a cell is completely empty. If a cell contains text, spaces, or hidden formatting characters, ISBLANK evaluates to FALSE, meaning it won't stop the formula from trying to calculate text against a date.
How can I show 'Invalid Date' instead of a blank cell when an error is caught?
You can customize the FALSE argument of your IF statement. Simply use a formula like =IF(ISNUMBER(F5),F5-TODAY(),"Invalid Date") to display a specific error message whenever text is encountered.
Are dates always treated as numbers in spreadsheets?
Yes, standard spreadsheet software like Excel and WPS Spreadsheet stores dates as sequential serial numbers so they can be reliably used in calculations. If a date is accidentally formatted as plain text, it must be converted back to a numeric date format before doing math.




