How would you sort records in a field so that the oldest birthday is listed first?

One of the most helpful features in Excel is the ability to sort your data by date. Maybe you need to arrange your family members’ birth dates to send out cards, sort your weekly budget transactions for year-end, or track sales revenue by month.

In Excel, there are several ways to sort your entries by date. You can put data in ascending or descending order, and you can sort by day, week, month, or year. We'll walk you through all the different options on how to sort by date in Excel.

How to Sort Excel Columns by Ascending or Descending Date

It’s easy to sort an individual column into ascending or descending date order in Excel:

  1. Select the data you want to sort.
  2. From the menu bar (also called the ribbon) at the top of your screen, under the Home tab, select Sort & Filter.
  3. Then choose Sort Oldest to Newest or Sort Newest to Oldest.

Screenshot Excel Sort Column by Date Ribbon

Alternatively, you can get the same result by selecting your data and using a right-click to select Sort. Then choose the order that works best for your data.

Screenshot Excel Sort Column by Date Right Click

This works well if you are only sorting a simple list of dates and plan to enter the corresponding data later. Sorting this way will always order your dates chronologically, by year first, then by month, then by day.

If you’re using Excel spreadsheet templates to organize your life or have tables of data, you may need to use other methods to sort by date in Excel instead, which we’ll go through next.

How to Sort Entire Tables by Ascending or Descending Date in Excel

When sorting dates in a table, it's helpful to add headings at the top of each column. For example, if you’re making a basic Gantt chart in Excel, you’ll have a list of tasks that corresponds to a list of dates. Below, we'll show you how to use these headings as categories to sort your data.

When you sort data in a table, it's important to highlight all of it. If you only highlight one column, you'll only sort that column, leaving the corresponding columns in their original order. Then the dates won't match up with the correct data.

If you catch the error right away, you can click Undo to return to the original arrangement. Otherwise, you might have to revert to a previous version of your document or re-enter the data. Fortunately, Excel usually catches this error in time to prevent it.

If you try to sort with only the dates selected, Excel should give you a warning and ask if you would like to expand your selection. When the error message pops up, select Expand the selection and click Sort.

Screenshot Excel Sort Warning

Then hover over the data selection. Highlight the missing items by dragging the small, green square at the bottom left corner and try sorting again.

Screenshot Excel Drag Selection to Highlight

Select the headings and data you want to sort. Then click Home > Sort & Filter and select your sort order.

Screenshot Excel Sort Ascending by Date

Note that this will only work if the date is in the first column of the table (in this example, it’s Column A). In Excel, if you'd like to sort by date when the dates are listed in a different column, you'll need to use Custom Sort.

Using Excel's Custom Sort to Sort By Date

Custom Sort is another handy way to sort by date in Excel. If your data has headings, you can use them as categories to sort entries easily, even if they aren't in the first column.

In the example below, a simple sort like we've already shown you will sort the items in the Transaction column alphabetically, instead of putting your dates in order. Since the date is in the second column, we need to use a Custom Sort to tell Excel to sort the dates in Column B. To do this:

  1. Highlight the headings and the data below them.
  2. In the Excel ribbon, click Home > Sort & Filter > Custom Sort. Check the box in the top-right corner to use your data headers as sorting categories.
  3. Next to Sort by, choose Date from the dropdown menu. Select Oldest to Newest or Newest to Oldest from the Order dropdown menu.

Screenshot Excel Custom Sort by Date

Custom Sort also lets you choose multiple sorting categories. For example, you might use this function if you want to see transactions listed first by one column, then by another.

In the Custom Sort box, select Sort by > [First Column]. Then click Add Level > Then by > [Second Column]. Click OK to sort your table.

Screenshot Excel Sort by Multiple Categories

Using Excel Functions to Sort by Month

There are some cases where you might want to extract the month from the date as entered. One example is putting all your colleagues’ birthdays in order, so you can acknowledge everyone with a monthly birthday cake. For your purposes here, the month is important, but the year is irrelevant.

There are many essential Excel functions and formulas that can help you do quick calculations or extract data from a cell. One such function is the MONTH function.

Use the MONTH function to pull each entry’s month digit from the full date. First, add a column with Month as the header. Click in the first empty cell under Month. In this case, it will be C2. Type =MONTH(B2), where B2 refers to the first entry in the Date column.

Screenshot Excel Sort MONTH Function

The MONTH function will output a digit from 1 to 12 into the corresponding cell. These digits represent the months in chronological date order, so January=1 and December=12. To enter the function quickly into every cell, select the cell that contains the formula. In this case, it's C2. Then, click and drag the green box that appears in the bottom corner of the cell, all the way to the bottom of the column.

Screenshot Excel MONTH Function

Now you can use Excel to sort dates by month, so you don’t miss anyone on your list. Highlight the whole table, including the headers > right-click > click Sort & Filter > Custom Sort > Sort by Month.

Screenshot Excel Custom Sort by Month

You can also use a function to sort the dates by year. Follow the instructions above, replacing the MONTH function with =YEAR(B2). The result will be a list of years in order.

Screenshot Excel YEAR Function

Using an Excel Formula to Sort by Month and Day

The MONTH function is quick and easy if you don't need the days in order, but let's say you want to celebrate each birthday individually. A formula can help here.

Add a column called Birthdays. In the empty cell (C2), next to the first date, type =TEXT(B2,"MMDD"), where B2 refers to the first date. This will return a list of dates, without the year, formatted as MMDD. For example, 12/07/1964 will become 1207.

Do a Custom Sort to put your birthday list in order. Since birthdays are formatted as text, rather than dates, Excel will give you a warning. Select Sort anything that looks like a number, as a number > OK, and your list will be in the correct order.

As an additional tip, you can use these different ways to strikethrough in Excel afterwards so that you can clearly view whose birthday has been celebrated in the spreadsheet.

Screenshot Excel Sort Warning

What If Sort by Date Isn’t Working in Excel?

If you applied the methods discussed above, but Excel isn’t sorting by date correctly, check that you’ve entered it in a format Excel will recognize. If all the numbers are left-justified in their cells, you might have them stored as text. To fix the format, click on the Text dropdown menu in the Excel ribbon and select a date format.

Screenshot Excel Date Format

Easy Ways to Sort by Date in Excel

Sorting dates in the correct order may feel mundane, yet it’s a crucial task that must be done accurately. Therefore, leave it to Excel’s sorting feature to sort your dates effectively. The ability to sort by date in Excel is super useful and has a variety of applications, as we’ve seen here.

There are many apps and useful spreadsheet templates out there to complete almost any task, from budgeting and expense tracking to wedding planning. Now that you understand how easy it is to sort by date in Excel, you can move on to using templates with greater confidence.

How would you sort record in ascending order?

Sort data in a table.
Select a cell within the data..
Select Home > Sort & Filter. Or, select Data > Sort..
Select an option: Sort A to Z - sorts the selected column in an ascending order. Sort Z to A - sorts the selected column in a descending order..

Which sorting option show dates from latest to earliest in SQL?

Replies (8)  Date/time values are stored as numbers - larger numbers are later times. So if you sort a Date/Time value ascending, it will be sorted oldest first, newest last. Was this reply helpful?

How do you sort a record?

To sort records: Click the Home tab on the Ribbon, and locate the Sort & Filter group. Sort the field by selecting the Ascending or Descending command. The table will now be sorted by the selected field. To save the new sort, click the Save command on the Quick Access Toolbar.