Keep a date inside an allowed window

Dates before the earliest allowed date move up. Dates after the latest move back.

What you'll make

In Excel: December 31, 2026 + earliest January 4, 2027 becomes January 4, 2027.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1MIN(A8,C8)The proposed date, or the latest date if earlier.November 4, 2026
2B8The earliest allowed date.10/28/2026
3MAX( … )The later of the two, so never too early.November 4, 2026

MIN works first, inside MAX. A date already inside the window stays the same.

=MAX(B8,MIN(A8,C8))

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 proposed, earliest and latest dates 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

Check that each earliest date comes before its latest date. Use this for scheduling rules, not to change real dates like birthdays.

Microsoft's help: MIN function