Treat an equal end time as the next day

When the same start and end time means a full day, 9 AM to 9 AM ends the next day.

What you'll make

In Excel: 11/4/2026 2:30:15 PM + 2:30:15 PM becomes 11/5/2026 2:30:15 PM.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1INT(A8)The start date, with its time dropped.11/4/2026
2+B8Adds the end time to that date.11/4/2026 2:30:15 PM
3ROUND(B8*86400,0)The end time in whole seconds.52215
4ROUND(MOD(A8,1)*86400,0)The start time in whole seconds.52215
5+IF( … ,1,0)Adds one day when the end is the same or earlier.11/5/2026 2:30:15 PM

Read it left to right. Excel stores a day as 1, so adding 1 moves to the next day.

=INT(A8)+B8+IF(ROUND(B8*86400,0)<=ROUND(MOD(A8,1)*86400,0),1,0)

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own dates and times. Paste start dates with times and end times into the green columns of the Template tab. The end dates and times fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Use this only when your source says the same time twice means a full day. It assumes the end is at most a day later.

Microsoft's help: IF function