Count dates shared by two inclusive intervals
Your goal: Clip each original interval to a reporting window, count both endpoints and preserve a distinct review result for reversed records.
Full task requirements
Fill C2:C5 with the number of calendar dates shared by each A:B interval and the inclusive reporting window G2:G3. Count both endpoints, return 0 for no overlap, and return Review when a source end precedes its start. Dates are whole numeric serials from 2000 through 2099; G3 must be on or after G2.
Inside, touching, outside and reversedFind the inclusive overlap for row 2
Reporting window: G2 is From (start); G3 is Through (end). Choose the source interval and these window boundaries. Dates remain numeric.
| # | |||
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 |
Step 1 of 4
Find the inclusive overlap for row 2
Rules for this step
Reject a reversed source interval first. Otherwise keep the later opening and earlier closing, include both endpoints, and use zero when they do not overlap.