Excel Arrange by Date: Sort Data Chronologically
In this article
To arrange data by date in Excel, select your data range, go to the Data tab, click Sort, and choose your date column as the Sort by option with the order set to Oldest to Newest (or Newest to Oldest). This works as long as Excel recognises the cells as real dates, not text. The steps below cover the quick sort, how to fix text dates that refuse to sort, and how to keep rows together so your data stays intact.
What You'll Need
- Excel for Windows, Mac, or Excel for the web (menu labels can differ slightly by version and region).
- A column containing dates. They must be stored as date values, not plain text.
- If your data has a header row, make sure it is a single row with unique labels.
Step-by-Step
- Select the data. Click any cell inside your table or range. If your data is formatted as an Excel Table (Insert > Table), sorting will automatically include all rows. If it is a plain range, press Ctrl+A (Windows) or Command+A (Mac) to select the current region, or drag to select all columns and rows you want sorted. Do not select only the date column unless you want to sort that column alone.
- Open the Sort dialog. Go to the Data tab and click Sort. The dialog gives you more control than the A-Z and Z-A buttons on the ribbon.
- Tell Excel your data has headers. In the Sort dialog, tick the box labelled "My data has headers" if your first row contains column names. This prevents Excel from sorting the header into the data.
- Choose the date column. In the "Sort by" dropdown, select the column that holds your dates (for example, "Order Date").
- Set the sort order. In the "Order" dropdown, choose Oldest to Newest for chronological order or Newest to Oldest for reverse chronological order. Excel treats these as date-specific options when the column is recognised as dates.
- Add a tie-breaker if needed. Click "Add Level" and pick a second column (such as an ID or name) so rows with the same date appear in a predictable order. This is optional but useful for reports.
- Apply the sort. Click OK. Excel rearranges the rows. If you selected only part of a range, Excel may ask whether to expand the selection; choose "Expand the selection" to keep entire rows together.
- Check the result. Scan the top and bottom of the date column to confirm the earliest or latest dates are where you expect. If the order looks wrong, undo with Ctrl+Z (Windows) or Command+Z (Mac) and check the next section.
Common Mistakes
- Sorting only the date column. If you select just the dates and click Sort, Excel may rearrange those cells while leaving the rest of each row behind, scrambling your data. Always select the whole table or use the Expand the selection option.
- Dates stored as text. Dates that are left-aligned in the cell are usually text. They will sort alphabetically (so "1/10/2024" may come before "1/2/2024") instead of chronologically. Convert them to real dates first (see Troubleshooting).
- Forgetting the header row. If "My data has headers" is unticked, Excel treats your column titles as data and may sort them into the middle of the list.
- Mixed date formats. A column containing both "DD/MM/YYYY" and "MM/DD/YYYY" entries can be misread depending on your regional settings. Standardise the format before sorting.
- Hidden rows or filtered data. Sorting a filtered list can produce unexpected results. Clear filters first (Data > Clear) so all rows are visible and included.
Tips
- Use the A-Z and Z-A buttons on the Data tab for a quick sort when you have already clicked inside the date column and your data is a proper table.
- Format the date column consistently (for example, all as Short Date) so the sorted order is easy to read.
- If you sort often, convert your range to an Excel Table (Insert > Table). Tables remember sort settings and expand automatically when you add rows.
- To sort by month or day of week regardless of year, add a helper column with a formula such as =TEXT(A2,"mmmm") and sort on that column instead.
- Before sorting a large or important sheet, make a copy of the worksheet (right-click the sheet tab > Move or Copy > Create a copy) so you can compare results.
Troubleshooting
The dates sort alphabetically, not chronologically. This means Excel sees them as text. Select the date column, go to Data > Text to Columns, click Next twice, choose Date in the Column data format list, pick the order that matches your data (MDY, DMY, or YMD), and click Finish. Excel converts the entries to real dates, and sorting will then work.
Some dates convert and others do not. Check for leading or trailing spaces, apostrophes at the start of the cell, or inconsistent separators (dots instead of slashes). Clean the data with Find & Replace (Ctrl+H) to remove stray spaces, then repeat the Text to Columns step.
The sort scrambles rows. Undo immediately (Ctrl+Z). Then select the entire data range, including all columns, before sorting, or use the Expand the selection prompt when it appears.
Only part of the data moves. You likely selected a single column. Select the whole table or range and sort again.
Dates show as numbers after sorting. The cells may have lost their date formatting. Select the column, right-click, choose Format Cells, and pick Date. The underlying values are still correct.
The Sort dialog is greyed out. This can happen when the worksheet is protected or when you are in a cell edit mode. Press Esc to exit edit mode, and unprotect the sheet via Review > Unprotect Sheet if you have the password.
Frequently Asked Questions
Can I sort by date without mixing up the other columns?
Yes. Select the entire table or range before sorting, or use the Expand the selection option when Excel prompts you. Sorting a single column on its own is what causes rows to break apart.
Why does my date column sort as text?
The cells are probably stored as text. Use Data > Text to Columns with the Date format to convert them, or re-enter the dates in a recognised format. Left-aligned dates are a common sign of text.
How do I sort by date and then by another column?
In the Sort dialog, set the first level to your date column, click Add Level, and choose a second column. Excel applies the second sort only where dates are equal.
Can I sort dates in a pivot table?
Yes. Right-click a date field in the pivot table, choose Sort, and pick Oldest to Newest or Newest to Oldest. If the field groups dates (for example by month), the sort applies to the grouped labels.
Does sorting by date work in Excel for the web?
Yes. Select your data, go to the Data tab, and use Sort. The dialog is similar, though some advanced options may differ from the desktop version.
What if my dates include times?
Excel sorts by the full date and time value. Dates with the same day but different times will be ordered by time. To sort by day only, add a helper column with =INT(A2) and sort on that.