Excel Formula: How to Ignore Blank Dates in Overdue Calculations
Question details
The user needs a formula to calculate overdue days that ignores blank cells in the expected return date column, preventing unwanted numerical outputs.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating overdue days by subtracting an expected return date from the current date in a structured table.
- Observed behavior
- The standard subtraction formula returns a large, unwanted negative number when the expected return date cell is blank.
Ensure your spreadsheet has dedicated columns for the expected return date and the current date (or uses the TODAY function). Check your regional system settings to determine whether your Excel formulas require commas or semicolons to separate arguments.
Use the IF Function to Return a Blank Cell
Wrap your subtraction formula inside an IF statement to check if the date cell is empty before performing the calculation.
By default, Excel treats empty cells as zero. When you subtract a date from zero, it results in an incorrect calculation. The IF function allows you to test for an empty string first.
Click on the cell in your table where you want the overdue days to be displayed.
Type the formula =IF([@[Expected return date]]="","",[@Today]-[@[Expected return date]]) into the formula bar.
Press Enter to apply the formula. If you receive an error and your region uses semicolons instead of commas, change it to =IF([@[Expected return date]]="";"";[@Today]-[@[Expected return date]]).

Return a Custom Status Text Like 'NA'
Modify the IF function to display specific status text when the date is missing, making it clear that data is pending.
Calculate Overdue Days Easily with WPS Spreadsheet
WPS Office provides a highly compatible spreadsheet tool that perfectly executes Excel formulas, including IF statements and date calculations. You can easily manage project timelines and track overdue tasks in a fast, lightweight environment.
- 1. Open your document: Launch WPS Spreadsheet and open your tracker document.
- 2. Select the calculation cell: Click the cell in the overdue column where you need the formula.
- 3. Enter the formula: Type =IF(B2="","",TODAY()-B2), replacing B2 with your actual date cell reference.
- 4. Fill the column: Drag the fill handle down to apply the formula to the rest of your table.

Frequently Asked Questions
Why does Excel show a large negative number when subtracting from a blank date cell?
Excel treats a completely blank cell as a zero. Since dates in Excel are stored as serial numbers starting from January 1, 1900, subtracting a recent date (like Today) from zero results in a large negative number.
Can I use the ISBLANK function instead of empty quotes?
Yes, you can achieve the same result by writing the formula as =IF(ISBLANK([@[Expected return date]]),"",[@Today]-[@[Expected return date]]). This specifically checks if the cell is completely empty.
How do I calculate the difference between two dates excluding weekends?
To calculate overdue days without counting weekends, use the NETWORKDAYS function. You can combine it with the IF function like this: =IF([@[Expected return date]]="","",NETWORKDAYS([@[Expected return date]],[@Today])).
How can I automatically highlight overdue days in red?
You can use Conditional Formatting. Select your overdue days column, go to the Home tab > Conditional Formatting > Highlight Cells Rules > Greater Than. Enter 0, and choose a red text or fill format.




