Check for Dates Within Six Months Before a Date in Excel
Question details
Check whether any date in a list falls within the six months before a specified date, excluding the specified date and later dates.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to compare a list of dates against a specified date and return a Yes or No result.
- Observed behavior
- The desired result is Yes if at least one date falls within the qualifying range, and No otherwise.
Make sure the dates in the list and the comparison cell are recognized as date values rather than text. For the date-only comparison below, remove time portions from the values if necessary.
Use COUNTIFS and EDATE to check the date range in Excel
Use this formula to return Yes when at least one date is within the six months before the comparison date.
The formula includes the date exactly six calendar months before the comparison date, but excludes the comparison date itself and all later dates.
Enter the dates to check in cells B1:B5 and enter the comparison date in E1.
Select an empty cell, enter =IF(COUNTIFS(B1:B5,">="&EDATE(E1,-6),B1:B5,"<"&E1)>0,"Yes","No"), and press Enter.
Check the formula cell: Yes means at least one date qualifies; No means none do. Change B1:B5 or E1 in the formula if your data is in different cells.

Check a six-month date range in WPS Spreadsheet
Use the same COUNTIFS and EDATE formula in WPS Spreadsheet to check whether any listed date falls within the six months before a comparison date.
- 1. Open your spreadsheet: Open WPS Spreadsheet and use Open to select your workbook, or create a new spreadsheet.
- 2. Enter the dates: Place the dates to check in B1:B5 and the comparison date in E1.
- 3. Add the formula: Select an empty cell and enter =IF(COUNTIFS(B1:B5,">="&EDATE(E1,-6),B1:B5,"<"&E1)>0,"Yes","No").
- 4. Check the answer: Press Enter and read Yes or No in the formula cell. Adjust the cell references to match your worksheet.

Frequently Asked Questions
Is the date exactly six months before the comparison date included?
Yes. The >= criterion includes the date returned by EDATE(E1,-6).
Does the formula include the comparison date?
No, when the cells contain date-only values. The <E1 criterion excludes E1 and later dates.
How can I check a longer list of dates?
Replace both instances of B1:B5 in the formula with your actual date range, such as B2:B100.
Why might a date on the comparison day return Yes?
If E1 contains a time, a value earlier on the same day can be less than E1. Remove time portions from the dates and E1 to compare whole dates.




