Build a date that stops at month-end

Turn 2026, 2 and 31 into February 28, 2026, the month's last real day.

What you'll make

In Excel: 2026 + month 2 + day 31 becomes February 28, 2026.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1DATE(A8,B8+1,0)Day 0 of next month: this month's last day.November 30, 2026
2DAY( … )How many days the month has.30
3MIN(C8, … )The day wanted, or the last day if smaller.4
4DATE(A8,B8, … )Puts the year, month and day together as a date.November 4, 2026

Each bracket wraps the one above it, so Excel works from the inside out.

=DATE(A8,B8,MIN(C8,DAY(DATE(A8,B8+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. Paste the year, month and day wanted into the green columns of the Template tab. The dates 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 rule says to move to month-end. A wrong birth date needs checking, not changing.

Microsoft's help: DATE function