Make a year-month text label from a date

Turn the date November 4, 2026 into the label 2026-11.

What you'll make

In Excel: November 4, 2026 becomes 2026-11.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesFor row 8
1A8The real date.November 4, 2026
2"yyyy-mm"The pattern: 4-digit year, then month."yyyy-mm"
3TEXT( … )Writes the year and month as text."2026-11"

Months always get two digits, so 4 becomes 04. Labels then sort by year, then month.

=TEXT(A8,"yyyy-mm")

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

Before you send

The result is text, not a date. Keep the original dates for date math.

Microsoft's help: TEXT function