Excel Formula to Check Whether a Date Is More Than Five Months Away
Question details
Use a formula to identify dates more than five months before or after today.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Compare dates in a worksheet with the current date and return Yes when a date is more than five calendar months away.
- Observed behavior
- Dates outside the five-month range should display Yes, while dates within the range can display No.
Make sure the values in the date column are recognized as Excel dates rather than text. The examples below use I2 as the date cell; change that reference if your dates are in another column.
Check Dates More Than Five Months Before or After Today
Use one formula to flag dates outside both the past and future five-month boundaries.
In an empty cell such as J2, enter =IF(I2="","",IF(OR(I2<EDATE(TODAY(),-5),I2>EDATE(TODAY(),5)),"Yes","No")) and press Enter.
Select J2 and drag its fill handle down alongside the dates in column I.

Check Only Past or Future Dates
Use a direction-specific formula when you only need to flag dates in the past or the future.
Check Five-Month Date Ranges in WPS Spreadsheet
Use the same EDATE and TODAY formula in WPS Spreadsheet to flag dates more than five calendar months before or after today.
- 1. Open your spreadsheet: Open WPS Spreadsheet and use Open to select your workbook.
- 2. Enter the formula: In an empty cell such as J2, enter =IF(I2="","",IF(OR(I2<EDATE(TODAY(),-5),I2>EDATE(TODAY(),5)),"Yes","No")) and press Enter.
- 3. Check the remaining dates: Select J2 and drag the fill handle down to apply the formula to the other rows.
- 4. Save the workbook: Use File > Save or Save As to save your changes in the desired spreadsheet format.

Frequently Asked Questions
How do I check only dates more than five months in the future?
Enter =IF(I2="","",IF(I2>EDATE(TODAY(),5),"Yes","No")) in an empty cell and fill it down. Replace I2 with your first date cell if necessary.
Does a date exactly five months away return Yes?
No. The formulas use < and >, so a date exactly on either five-month boundary returns No. Use <= or >= if you want to include the boundary.
Why does the formula leave some results blank?
The initial IF(I2="","",...) check leaves the result blank when I2 is empty. Check the referenced date cell if you expected a Yes or No result.
Does five months mean a fixed number of days?
No. EDATE calculates a date five calendar months before or after today. If the target month has fewer days, it uses the last day of that month.




