logo
search
Formula Errors

Excel Formula: How to Ignore Blank Dates in Overdue Calculations

Nimra MalikNimra Malik Oct 26, 2026 869 views

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.

Excel Formula to Ignore Blank Dates When Calculating Overdue Days
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target cell

Click on the cell in your table where you want the overdue days to be displayed.

2
Enter the IF formula

Type the formula =IF([@[Expected return date]]="","",[@Today]-[@[Expected return date]]) into the formula bar.

3
Apply and adjust for regional settings

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]]).

Use the IF Function to Return a Blank Cell
Clean Data Display: Returning an empty string ("") keeps your spreadsheet visually clean and prevents downstream errors in charts or pivot tables.

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. 1. Open your document: Launch WPS Spreadsheet and open your tracker document.
  2. 2. Select the calculation cell: Click the cell in the overdue column where you need the formula.
  3. 3. Enter the formula: Type =IF(B2="","",TODAY()-B2), replacing B2 with your actual date cell reference.
  4. 4. Fill the column: Drag the fill handle down to apply the formula to the rest of your table.
Fully compatible with Microsoft Excel formulas, formatting, and functions.Built-in date and time functions for seamless tracking.Lightweight design for fast processing of large datasets without lag.Free to use with an intuitive, familiar interface.
QA img-9

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.