Count Dates from the Last 12 Months in Excel
Question details
Count training completion dates that fall within the 12 calendar months ending today.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A training compliance workbook needs to identify records with completion dates no older than one year.
- Observed behavior
- The desired count includes dates from the 12-month cutoff through today and excludes older and future dates.
Check that the completion dates in B1:B27 are stored as Excel dates rather than text. Adjust the range in the formula if your dates are in different cells.
Count dates within the last 12 calendar months
Use COUNTIFS with EDATE and TODAY to count dates from the one-year cutoff through today.
In the Excel worksheet, click an empty cell where you want the compliant count to appear.
Type =COUNTIFS($B$1:$B$27,">="&EDATE(TODAY(),-12),$B$1:$B$27,"<"&TODAY()+1) and press Enter.
Compare the count with the dates in B1:B27. The formula includes the cutoff date and all of today, including entries with times, but excludes future dates.

Count recent training dates in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and use COUNTIFS, EDATE, and TODAY to count completion dates within the last 12 calendar months.
- 1. Open the workbook: Open WPS Spreadsheets and select Open to choose your training compliance workbook.
- 2. Select a result cell: Click an empty cell where you want to display the count.
- 3. Enter the formula: Type =COUNTIFS($B$1:$B$27,">="&EDATE(TODAY(),-12),$B$1:$B$27,"<"&TODAY()+1), adjust the range if necessary, and press Enter.
- 4. Save the workbook: Select File > Save to keep the formula in your workbook.

Frequently Asked Questions
Does the formula include the date exactly 12 months ago?
Yes. The >= criterion includes the date returned by EDATE(TODAY(),-12).
Why does the formula use less than tomorrow instead of less than or equal to today?
The <TODAY()+1 criterion includes every time on today's date. A <=TODAY() criterion can exclude today's entries if they contain a time.
How do I use a 365-day cutoff instead of 12 calendar months?
Replace EDATE(TODAY(),-12) with TODAY()-365 in the COUNTIFS formula. Keep the <TODAY()+1 criterion to exclude future dates.
What if a completion date is not counted?
Check that the cell is within the formula's range and contains a real Excel date, not text. Also check whether it falls between the cutoff date and today.




