How to Keep Excel Date Formula Blank When Source Cell is Empty
Question details
Modify a date formula to calculate a date two years in the future while ensuring the result remains blank if the source cell is empty.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Calculating future dates based on a source column containing dates, where some source cells may be empty and should not trigger a calculation.
- Observed behavior
- Without a condition, the formula evaluates a blank source cell as a zero serial value, resulting in an incorrect default date (like January 1900) instead of leaving the cell blank.
Ensure that your source column is formatted as Dates and that the blank cells are truly empty, not containing hidden spaces or invisible characters.
Use the IF and EDATE Functions (Recommended)
The EDATE function is the cleanest and most efficient way to add exactly two years (24 months) to a date, combined with the IF function to seamlessly handle blank cells.
The EDATE function calculates the exact same day of the month a specified number of months in the future or past. By nesting it inside an IF statement, you can tell the spreadsheet to return an empty string when the reference cell is blank.
Click on the cell where you want the calculated future date to appear (for example, D4).
Type the formula =IF(C4="","",EDATE(C4,24)) into the formula bar. Replace C4 with the actual reference to your source date cell. The "24" represents two years (24 months).
Press Enter to apply the formula. Then, click and drag the fill handle (the small square at the bottom right of the selected cell) down the column to apply it to your entire dataset.

Use the IF Function with DATE Components
A more traditional approach using DATE, YEAR, MONTH, and DAY functions for fine-grained control over the date calculation when the source cell is not empty.
Easily Manage Date Formulas with WPS Spreadsheet
WPS Spreadsheet fully supports advanced logical and date functions like IF, EDATE, and DATE. You can seamlessly calculate expiration dates, project timelines, and handle blank cells with exact compatibility.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the dates.
- 2. Input the conditional formula: Select the target cell, type =IF(C4="","",EDATE(C4,24)), and press Enter.
- 3. Drag to fill: Drag the fill handle downwards to apply the calculation to the rest of the column, perfectly bypassing all blank source cells.

Frequently Asked Questions
Why does my date formula return 1/0/1900 when the source is blank?
In spreadsheet software, an empty cell is mathematically treated as a zero value. When a date format is applied to zero, it displays as the start of the system's date calendar, which is January 0, 1900. Using the IF function to check for blanks prevents this mathematical conversion.
Can I use this formula to subtract years instead of adding them?
Yes. With the EDATE formula, simply use a negative number of months. For example, =IF(C4="","",EDATE(C4,-24)) will subtract two years from the source date.
What if the source cell contains a space instead of being completely empty?
If the cell contains a space, the C4="" logical test will evaluate to false, resulting in a #VALUE! error when EDATE tries to process it. You can use =IF(TRIM(C4)="","",EDATE(C4,24)) to handle cells with accidental spaces.
Does this formula work in WPS Office Spreadsheet just like in Excel?
Yes, WPS Spreadsheet supports all standard date and logical functions, including IF, DATE, EDATE, YEAR, MONTH, and DAY. The syntax is 100% identical.




