Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Sort by Birthday Month & Date

· 5 min read · Home Tech

In this article
  1. Why the Year Breaks Normal Sorting
  2. Method 1: Helper Column with TEXT Function
  3. Method 2: Helper Column with MONTH and DAY Functions
  4. How to Sort Without Losing Data
  5. Sorting by Month Only (Ignoring Day)
  6. Dealing with Blank Cells and Text Entries
  7. Frequently Asked Questions

To sort birthdays by month and day in Excel, ignoring the year, you need to create a helper column that extracts the month and day from each date, then sort by that helper column. The core formula is =TEXT(A2,"MMDD") or =MONTH(A2)*100+DAY(A2), which converts each date into a sortable number like 0101 for January 1st or 1231 for December 31st.

Why the Year Breaks Normal Sorting

When you sort a column of dates in Excel, it sorts by the full date value, which includes the year. So a birthday on 15/03/1985 sorts before one on 20/03/1990, even though both are in March. If you want to see everyone’s birthday in order of month and day—January birthdays first, then February, and so on—the year must be removed from the sort key. Excel stores dates as serial numbers, and the year is part of that number, so a direct sort always puts older years first.

Method 1: Helper Column with TEXT Function

The simplest approach is to add a new column next to your birthday data and use the TEXT function to format the date as a text string containing only the month and day.

  1. Insert a new column to the right of your birthday column (say column B if birthdays are in A).
  2. In cell B2, enter: =TEXT(A2,"MMDD")
  3. Drag the formula down to cover all rows.
  4. Select the entire data range (including the helper column) and sort by the helper column.

The "MMDD" format code produces a four-digit text string: January 5 becomes "0105", December 31 becomes "1231". Because text strings starting with "01" come before those starting with "02", sorting this column alphabetically gives you chronological month-day order. This method works in all modern Excel versions (2010, 2013, 2016, 2019, 365, and Excel for the web).

Method 2: Helper Column with MONTH and DAY Functions

If you prefer a numeric helper column, use this formula:

=MONTH(A2)*100 + DAY(A2)

This returns a number like 115 for January 15th, 1231 for December 31st, and 301 for March 1st. Sorting numerically on this column gives the same chronological order. The advantage of a numeric helper is that you can later use it in other calculations or filters. The disadvantage is that it’s less readable if you glance at the column—you see 115 instead of "Jan 15".

How to Sort Without Losing Data

When you sort, you must select the entire range of data, not just the birthday column. If you only select the birthday column and sort, Excel will reorder that column independently, scrambling the rest of your row data (names, emails, etc.). Always highlight all columns that belong to each person before sorting.

  1. Click any cell inside your data table.
  2. Go to the Data tab and click Sort.
  3. In the dialog, choose the helper column as the Sort by field.
  4. Set Sort On to Values (or Cell Color if you used formatting).
  5. Set Order to Smallest to Largest (for numeric helper) or A to Z (for text helper).
  6. Click OK.

If your data has headers, check the “My data has headers” box in the Sort dialog so the header row isn’t sorted along with the data.

Sorting by Month Only (Ignoring Day)

If you only need to group by month, not by the exact day, use a helper column with =MONTH(A2). This gives you numbers 1–12. Sorting by this column groups all January birthdays together, but within each month the order is arbitrary (based on the original row order). If you want month order and then day order within each month, use the combined MMDD method above, which is almost always what people mean by “sort by birthday”.

Dealing with Blank Cells and Text Entries

If your birthday column contains blank cells or text like “unknown”, the helper formulas will return errors (#VALUE!). To avoid this, wrap the formula in an IFERROR:

=IFERROR(TEXT(A2,"MMDD"),"9999")

or

=IFERROR(MONTH(A2)*100+DAY(A2),9999)

Using 9999 (or "9999") ensures that blank or invalid rows sort to the bottom. Alternatively, you can leave the errors and sort anyway—Excel will place errors at the bottom, but it’s cleaner to handle them explicitly.

Frequently Asked Questions

How do I sort birthdays by month in Excel without a helper column?

You can’t do it directly with the built-in sort. Excel’s sort always uses the cell value, and the cell value includes the year. The helper column is the standard, reliable method. There is no native “sort by month” option in Excel’s sort dialog.

Why does my sort put January 1st after December 31st?

That happens if you sort the original date column, not the helper column. The original dates include years, so a 1990 date sorts before a 1985 date regardless of month. The helper column removes the year, so sorting it gives the correct month-day order.

Can I use a PivotTable to sort birthdays by month?

Yes. Create a PivotTable with the birthday field in the Rows area, then right-click any date and choose Group, then select Months and Days. This groups dates by month and day, and you can sort the month field alphabetically (which works because month names sort in chronological order). This method is useful if you want counts per day, but for a simple list of names, the helper column is faster.

Does this work in Google Sheets?

Yes, the same formulas work in Google Sheets. Use =TEXT(A2,"MMDD") or =MONTH(A2)*100+DAY(A2). The sort steps are similar: select the range, right-click, and choose Sort range.

How do I sort by birthday but keep the original year?

If you want to keep the year visible but sort by month/day, the helper column method still works. The helper column only affects the sort order; your original date column remains unchanged. After sorting, you can hide the helper column if you don’t want to see it.

What if my dates are in text format like “15/03/1985”?

If the dates are stored as text, the MONTH and DAY functions won’t work because they expect a real date. First, convert the text to a date using =DATEVALUE(A2) in a new column, then apply the helper formula to that converted date. If the text is in a non-standard format, you may need to use =DATE(MID(A2,7,4),MID(A2,4,2),LEFT(A2,2)) for DD/MM/YYYY format.