Excel Auto Sort by Date: How to Do It
In this article
Yes, Excel can auto-sort by date, but the method depends on whether you want a one-time sort or a live, automatically updating sort. For a one-time sort, you use the built-in Sort command. For continuous auto-sorting (where new rows are instantly placed in the correct date order), you need to convert your data into an Excel Table or use a formula-based approach.
Why Auto-Sort by Date Is Tricky
Many users assume Excel will automatically keep their data sorted by date as they add new entries. By default, it does not. A normal range of cells is static—when you type a new row at the bottom, Excel leaves it there. The confusion often comes from Excel Tables, which automatically extend formulas and formatting to new rows, but they do not automatically reorder rows. So if you want true auto-sorting, you have to set it up deliberately.
Method 1: One-Time Sort (Quick and Simple)
This is the most common way to sort by date, and it works on any range of data. It sorts the data once; if you add new rows later, you must re-run the sort.
- Select any cell within your data range (including the date column).
- Go to the Data tab on the ribbon.
- Click the Sort button (not the small A→Z or Z→A icons, unless you only have one column).
- In the Sort dialog, choose the column that contains your dates under “Sort by.”
- Under “Sort On,” select “Cell Values.”
- Under “Order,” choose “Oldest to Newest” or “Newest to Oldest.”
- Click OK.
If your data has a header row, make sure “My data has headers” is checked. If your dates are stored as text (e.g., “Jan 5, 2025”), Excel may not sort them correctly—see the section on date formats below.
Method 2: Auto-Sort Using Excel Tables
Excel Tables (created with Ctrl+T) offer a semi-automatic approach. They don’t reorder rows by themselves, but they make it much easier to re-sort after adding data, and they automatically expand to include new rows in the sort range.
- Select your data range (including headers).
- Press Ctrl+T (or go to Insert → Table).
- In the Create Table dialog, confirm the range and check “My table has headers.”
- Click OK.
- Now click the drop-down arrow in the date column header.
- Choose “Sort Oldest to Newest” or “Sort Newest to Oldest.”
When you add a new row at the bottom of the table, the table expands to include it. However, the new row will appear at the bottom until you re-sort. To make it fully automatic, you need a formula-based approach.
Method 3: Fully Automatic Sorting with Formulas
If you need the data to reorder itself instantly whenever you add or change a date, you can use the SORT function (available in Excel 365 and Excel 2021). This creates a dynamic array that updates automatically.
- Create a new sheet or a blank area to the right of your data.
- In the first cell, enter the formula:
=SORT(A2:B100, 1, 1)where A2:B100 is your data range, 1 is the column number containing dates, and 1 means ascending (oldest to newest). Use -1 for descending. - Press Enter. Excel will spill the sorted data into the cells below and to the right.
This formula updates automatically when you change a date or add a new row (as long as you extend the range in the formula). If you want to include new rows without editing the formula, convert the source range to an Excel Table and use structured references, e.g., =SORT(Table1[#All],1,1).
Common Problems and How to Fix Them
- Dates are not recognized as dates: If your dates are left-aligned in the cell, they are likely text. Select the column, go to Data → Text to Columns, and click Finish (or use Date format). This usually converts text dates to real dates.
- Sorting only one column: If you select only the date column and sort, Excel will ask if you want to expand the selection. Always choose “Expand the selection” to keep rows together.
- Mixed date formats: If some cells are text and some are real dates, sorting will be inconsistent. Convert all to real dates first.
- Blank cells: Blank cells are sorted to the bottom (or top, depending on order). If you want blanks ignored, filter them out first.
- Auto-sort not working after adding rows: For the SORT function, ensure the range in the formula includes the new rows. Using a Table reference solves this.
Excel Tables vs. SORT Function: Which to Choose?
Excel Tables are ideal for users who want a simple, visual way to manage data and don’t mind clicking sort occasionally. They also offer built-in filtering and structured references. The SORT function is better for dashboards or reports where you want the data to reorder itself without any manual action. However, the SORT function requires a recent Excel version and can be tricky if your data has merged cells or complex layouts.
Frequently Asked Questions
Why is Excel not sorting my dates correctly?
Most likely because your dates are stored as text. Check if the cells are left-aligned. If so, select the column, go to Data → Text to Columns, and click Finish. This converts text dates to real dates. Also ensure you are sorting by the correct column and that you expand the selection when prompted.
Can I auto-sort by date in Google Sheets?
Yes, Google Sheets has a similar SORT function: =SORT(A2:B100, 1, TRUE). It also has a built-in “Sort range” option under Data. The same principles apply: ensure dates are real dates, not text.
How do I sort by date but keep rows together?
Always select the entire data range, not just the date column. When you use the Sort dialog, Excel automatically includes adjacent columns. If you use the A→Z button on a single column, Excel will prompt you to expand the selection—choose that option.
Does the SORT function work in Excel 2019?
No, the SORT function is only available in Excel 365 and Excel 2021. In Excel 2019, you can use the legacy array formula (Ctrl+Shift+Enter) with INDEX, MATCH, and SMALL, but it is complex. The simplest alternative is to use an Excel Table and re-sort manually.
Can I auto-sort by date without formulas?
No, without formulas or VBA, Excel will not reorder rows automatically. The closest you can get is an Excel Table, which makes re-sorting a single click, but you still have to click it. For true automation, use the SORT function or a small VBA macro.