Write a date range without repeats

Turn two dates into November 4, 2026 – November 6, 2026. The same date twice shows once.

What you'll make

In Excel: December 31, 2026 to December 31, 2026 becomes December 31, 2026.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1A8=B8Checks if the start and end dates are the same.No
2TEXT(A8,"mmmm d, yyyy")Writes the one date, used when they match.Not used for row 8
3TEXT(A8,"mmmm d, yyyy")&" – "Writes the start date, then a dash."November 4, 2026 – "
4TEXT(B8,"mmmm d, yyyy")Writes the end date."November 6, 2026"
5IF( … )Uses part 2 if part 1 says yes, otherwise parts 3 and 4."November 4, 2026 – …"

Read it left to right. The dash between the dates is inside part 3.

=IF(A8=B8,TEXT(A8,"mmmm d, yyyy"),TEXT(A8,"mmmm d, yyyy")&" – "&TEXT(B8,"mmmm d, yyyy"))

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. Paste start dates and end dates into the green columns of the Template tab. The date ranges fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Put the earlier date in Start date. The formula doesn't check the order.

Microsoft's help: TEXT function