Calculate time shared by two intervals
Turn 2:30 to 5:30 PM and 4:30 to 7:30 PM into 1:00 of shared time.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | MIN(B8,D8) | The earlier of the two end times. | 5:30 PM |
| 2 | -MAX(A8,C8) | Takes away the later of the two start times. | 1:00 |
| 3 | MAX(0, … ) | Shows 0:00 when the intervals don't overlap. | 1:00 |
Read it left to right. MAX wraps everything, so it works last.
=MAX(0,MIN(B8,D8)-MAX(A8,C8))How to use it
Yellow bar at the top? Click Enable Editing.
- See it work. The Example tab shows 20 made-up examples with the formula already in.
- Use your own times. Paste each interval's start and end times into the green columns of the Template tab. The shared time fills in by itself.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Put each start before its own end. For intervals across midnight, paste full dates with times. Intervals that only touch share 0:00.
Microsoft's help: MAX function



