Function Problems

Count Dates from the Last 12 Months in Excel

Huda QurayshiHuda Qurayshi Nov 18, 2026 870 views

Question details

Count training completion dates that fall within the 12 calendar months ending today.

Count Dates from the Last 12 Months in Excel
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.
Before you start

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.

Solution 1Recommended

Count dates within the last 12 calendar months

Use COUNTIFS with EDATE and TODAY to count dates from the one-year cutoff through today.

1
Select a result cell

In the Excel worksheet, click an empty cell where you want the compliant count to appear.

2
Enter the formula

Type =COUNTIFS($B$1:$B$27,">="&EDATE(TODAY(),-12),$B$1:$B$27,"<"&TODAY()+1) and press Enter.

3
Check the result

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 dates within the last 12 calendar months
Use a fixed 365-day window: If your policy specifies 365 days rather than 12 calendar months, use =COUNTIFS($B$1:$B$27,">="&TODAY()-365,$B$1:$B$27,"<"&TODAY()+1). The two cutoffs can differ around leap years.
Count compliance dates in WPS

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. 1. Open the workbook: Open WPS Spreadsheets and select Open to choose your training compliance workbook.
  2. 2. Select a result cell: Click an empty cell where you want to display the count.
  3. 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. 4. Save the workbook: Select File > Save to keep the formula in your workbook.
Automatically updates the 12-month cutoff as the date changesExcludes future completion dates from the compliant countCompatible with Microsoft Excel XLSX and XLS filesFree spreadsheet tools with a familiar interface
QA img-9

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.