How to Calculate Rolling 12-Month Attendance Totals in Excel
Question details
The user needs a method to calculate employee leave occurrences over a rolling 12-month period rather than a static calendar-year total.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Tracking employee attendance and managing leave point systems where absences expire exactly 12 months after the occurrence date.
- Observed behavior
- The current spreadsheet calculates totals based on a fixed calendar year, failing to dynamically update as the 12-month window shifts forward.
Ensure your attendance spreadsheet has a dedicated column for leave dates, and verify that these dates are formatted as proper Date values in Excel rather than plain text.
Use COUNTIFS and EDATE for a Dynamic Rolling 12-Month Total
Implement a formula using COUNTIFS alongside TODAY() and EDATE to automatically count occurrences from the past year up to the current date.
A rolling period cannot be calculated reliably by just finding the earliest leave date. By combining the TODAY() function to identify the current date and the EDATE function to subtract exactly 12 months, you create a dynamic window that updates automatically every day.
Click on the cell where you want the total rolling 12-month attendance count to be displayed.
Type the formula =COUNTIFS(A:A, ">="&EDATE(TODAY(),-12), A:A, "<="&TODAY()) into the formula bar, replacing 'A:A' with the specific column range that contains your employee leave dates.
Press Enter to execute the formula. The cell will now output the total number of leave occurrences strictly within the trailing 12-month window.

Easily Track Rolling Attendance with WPS Spreadsheet
WPS Spreadsheet fully supports advanced date functions like COUNTIFS, EDATE, and TODAY(), allowing you to build dynamic rolling 12-month attendance trackers with zero hassle.
- 1. Open your attendance tracker: Launch WPS Spreadsheet and open your existing employee attendance workbook.
- 2. Select the calculation cell: Click on the cell designated for the rolling 12-month total.
- 3. Input the dynamic formula: Enter the COUNTIFS formula using EDATE and TODAY() exactly as you would in Microsoft Excel.
- 4. Apply to multiple rows: Press Enter to calculate the result, then drag the fill handle down to apply the rolling period formula to the rest of your employees.

Frequently Asked Questions
Can I calculate the rolling 12-month period based on a specific end date instead of today?
Yes. Instead of using TODAY(), replace it with a reference to the cell containing your specific target date. For example: =COUNTIFS(A:A, ">="&EDATE(C2,-12), A:A, "<="&C2), assuming C2 holds your target date.
How do I calculate total hours taken in a rolling 12-month period instead of just the number of occurrences?
To calculate a sum instead of a count, use the SUMIFS function. The syntax would be: =SUMIFS(Hours_Column, Date_Column, ">="&EDATE(TODAY(),-12), Date_Column, "<="&TODAY()).
Why is my rolling 12-month formula returning zero?
This commonly occurs if the leave dates in your column are stored as text rather than actual Excel Date values. Select the column containing your dates, right-click to choose 'Format Cells', and ensure the format is set to Date.




