Calculation Issues

Calculate Overlapping Absence Days in an Excel 365 Rolling 12-Month Period

Tauseeq MagsiTauseeq Magsi Nov 20, 2026 868 views

Question details

Calculate only the days of each absence that fall within a rolling 12-month reporting period.

Calculate Overlapping Absence Days in an Excel 365 Rolling 12-Month Period
Product
Microsoft Excel 365
Device & OS
not provided
Scenario
Absence start and end dates may fall partly outside the reporting window.
Observed behavior
A formula may count the entire absence instead of only the days that overlap the reporting window.
Before you start

Enter absence start dates in column A and end dates in column B as actual Excel dates, without time values. Decide whether absence boundary dates count and choose the reporting period's end date.

Solution 1Recommended

Calculate inclusive absence days within the reporting window

Use this method when both the absence dates and reporting-window dates are included in the count.

1
Set the reporting window

Enter the reporting end date in E3. In E2, enter =EDATE(E3,-12)+1 to set the start of a 12-month window ending on E3.

2
Calculate each overlap

In C2, enter =IF(AND(ISNUMBER(A2),ISNUMBER(B2),ISNUMBER($E$2),ISNUMBER($E$3),A2<=B2,$E$2<=$E$3),MAX(0,MIN(B2,$E$3)-MAX(A2,$E$2)+1),""). The formula returns zero when a valid absence does not overlap the window and leaves invalid or missing dates blank.

3
Copy and total the results

Drag the fill handle from C2 down through the absence rows. In a separate cell, enter =SUM(C2:C100), adjusting the range to cover your records.

Calculate inclusive absence days within the reporting window
Overlapping absence records: The sum counts each row separately. If absence records overlap one another, shared dates will be counted more than once.
Calculate absence overlaps in WPS

Calculate Rolling Absence Days in WPS Spreadsheet

Use date and overlap formulas in WPS Spreadsheet to count only absence days within your reporting window.

  1. 1. Open the workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
  2. 2. Define the window: Enter the reporting end date in E3 and =EDATE(E3,-12)+1 in E2.
  3. 3. Calculate the overlap: With absence dates in A2 and B2, enter =IF(AND(ISNUMBER(A2),ISNUMBER(B2),ISNUMBER($E$2),ISNUMBER($E$3),A2<=B2,$E$2<=$E$3),MAX(0,MIN(B2,$E$3)-MAX(A2,$E$2)+1),"") in C2.
  4. 4. Fill and total: Drag C2's fill handle down the absence rows, then enter =SUM(C2:C100) in a separate cell, adjusting the range as needed.
Calculate partial overlaps instead of counting full absencesOpen and save Microsoft Excel XLSX workbooksCopy formulas down rows and sum the resultsUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the overlap formula add one day?

The +1 counts both endpoints when the absence and reporting-window dates are inclusive. For example, an absence from March 1 through March 3 counts as three days.

What happens if an absence is entirely outside the reporting window?

MAX(0,...) returns zero for a valid absence with no overlap, preventing a negative day count.

How do I change the rolling period's end date?

Enter a new reporting end date in E3. The EDATE formula in E2 and the overlap formulas will update using that date.

Will the total count the same date twice if absence records overlap?

Yes. SUM adds each row's overlap separately, so overlapping records can double-count shared dates. Combine overlapping intervals first if you need unique absence days.