How to Sort Dates in Excel — Complete Guide (2026)

Sort dates in Excel: oldest to newest, newest to oldest, fix when dates don't sort correctly (text dates), sort by month or weekday. Complete 2026 guide.

Microsoft ExcelBy Katherine LeeMay 27, 202616 min read
How to Sort Dates in Excel — Complete Guide (2026)

How Excel Actually Stores Dates — and Why It Matters for Sorting

Here's something most people don't realize: Excel doesn't store dates as "January 15, 2024" or "15/01/2024." It stores them as plain numbers — called serial numbers. January 1, 1900 is serial number 1. January 1, 2024 is serial number 45,292. Every day is just one number higher than the previous. That's it.

This design is what makes sorting dates so powerful. When your dates are real Excel dates, sorting them is no different from sorting any other number column — Excel lines up the serial numbers in order, lowest to highest or highest to lowest, and you get your dates in perfect chronological sequence. It works instantly, every time.

The problem? Not every value that looks like a date in your spreadsheet is actually stored as a date. If you import data from a CSV, copy from a web page, or receive a file from an external system, those values might be stored as text strings. "01/15/2024" typed as text and "01/15/2024" stored as a real Excel date look identical on screen — but only one of them will sort correctly.

Understanding the difference isn't just academic. When you sort real Excel dates, they always go in the right order because you're really sorting numbers. When you sort text that looks like dates, Excel falls back to alphabetical sorting — character by character, left to right. That's why you sometimes see 2023 dates appearing after 2024 dates, or months out of order. The dates look right but they're not behaving like dates at all.

You can also bookmark our excel reference for shortcuts and formulas you'll use every day. And if you want a broader overview of all sorting types, the how to sort by date in Excel article covers the full landscape — this guide goes deeper on the date-specific issues.

Basic sort: Select your date column → Data tab → Sort Oldest to Newest (or use the A→Z button). For newest first, click Sort Newest to Oldest.

Dates not sorting correctly? They're almost certainly stored as text, not real date values. The giveaway: dates are left-aligned in the cell instead of right-aligned. Fix with Data → Text to Columns → Finish to convert them to real dates, then sort again.

Excel Date Sorting: Four Key Scenarios

Basic Date Sort

Sort a date column from oldest to newest or newest to oldest in seconds.

  • Method: Data tab → Sort Oldest to Newest
  • Shortcut: Alt+A+S+A (oldest first)
  • Works When: Dates are stored as real Excel dates (right-aligned)
  • Result: Chronological order, all rows move together
Sort Newest to Oldest

Put the most recent dates at the top — common for logs, transactions, and timelines.

  • Method: Data tab → Sort Newest to Oldest
  • Shortcut: Alt+A+S+D (newest first)
  • Use Case: Sales logs, activity feeds, date-stamped records
  • Tip: Click dropdown arrow in a Table for one-click access
Fix Text Dates

When dates look right but sort wrong, they're stored as text. Two ways to fix it.

  • Quick Fix: Data → Text to Columns → Finish
  • Formula Fix: =DATEVALUE(A1) converts text to serial number
  • Sign of Text Date: Left-aligned in cell, ISNUMBER returns FALSE
  • After Fix: Paste as values, then sort normally
Sort by Month or Weekday

Extract just the month or day-of-week with a helper column, then sort by that.

  • Month Sort: =MONTH(A1) → sort helper column 1–12
  • Weekday Sort: =WEEKDAY(A1) → sort helper column 1–7
  • Dynamic (Excel 365): =SORT(A2:B10, 1, 1) — no helper needed
  • After Sort: Delete helper column or hide it
Microsoft Excel - Microsoft Excel certification study resource

Basic Date Sort — Step by Step

If your dates are stored correctly as Excel date values, sorting them is genuinely straightforward. Here's exactly how to do it.

Method 1: The Data Tab

Click any cell inside your date column — you don't need to select the whole column. Then go to the Data tab in the ribbon. You'll see two buttons in the Sort & Filter group: Sort Oldest to Newest (A→Z with a calendar icon) and Sort Newest to Oldest (Z→A icon). Click the one you want.

If your data has multiple columns, Excel will ask whether to expand the selection (sort all columns together, keeping each row intact) or continue with only the date column. Always choose Expand the selection — sorting just the date column scrambles the rest of your data. After sorting, scan the first few rows to verify the order makes sense.

Keyboard Shortcuts for Date Sorting

No mouse needed. Place your cursor anywhere in the date column, then press each key in sequence:

  • Oldest to Newest: AltASA
  • Newest to Oldest: AltASD

Alt activates the ribbon, A goes to the Data tab, S opens Sort & Filter, and A/D selects ascending or descending. Works in Excel 2007 and later. You can also right-click a date cell → Sort → Sort Oldest to Newest — quicker when you're already in the right area.

Sorting Dates in an Excel Table

Formatted as a Table (Ctrl+T)? Click the dropdown arrow in your date column header — Sort Oldest to Newest is right at the top. One click. Tables also keep row relationships intact automatically, so the expand-selection warning never appears. Add new rows and they slot into the sort order without any extra steps.

Multi-Column Sort: Date + Another Column

Go to Data → Sort (the full dialog). Click Add Level. Set the first key to your date column (Oldest to Newest), the second to another column — name, priority, or anything else. Excel sorts the primary column first, then within ties it sorts by the secondary column. You can chain up to 64 levels.

Our guide on sort a column in Excel covers multi-key sorts in detail, and the principles for sort alphabetically in Excel apply directly to any text column you'd use as a tiebreaker.

Date Sorting Methods Side by Side

Steps:

  1. Click any cell in your date column
  2. Go to Data tab → click Sort Oldest to Newest (A→Z with calendar icon)
  3. If prompted, choose Expand the selection to keep rows together
  4. Done — dates now run from earliest to most recent

Keyboard shortcut: Alt → A → S → A

In a Table: Click the column header dropdown → Sort Oldest to Newest

Common mistake: Selecting only the date column without expanding — this sorts dates but leaves all other columns in their original order, breaking the row relationships. Always expand the selection unless you have a single-column dataset.

Why Your Dates Aren't Sorting Correctly

This is the most-searched question in the Excel date space — and for good reason. You click Sort Oldest to Newest and the dates come out in a seemingly random order. Or the sort looks like it worked, but 2023 dates appear after 2024 dates. Or January appears before December but June appears in the middle. What's happening?

In almost every case, the answer is the same: your dates are stored as text, not as real date values. The sort by date excel not working problem has one root cause in 90% of cases, and this is it.

How to Tell If Your Dates Are Text

Real Excel dates are right-aligned in the cell by default — just like numbers, because that's what they are underneath. Text values are left-aligned by default. So the quickest visual check: look at how your dates sit in the cell. Left-aligned? Almost certainly text. Right-aligned? Probably real dates.

For a definitive test, use the ISNUMBER function in a blank cell next to your date:

=ISNUMBER(A1)

If this returns TRUE, your date is a real numeric date value. If it returns FALSE, it's stored as text — and it won't sort correctly. This is the most reliable diagnostic available.

A third test: try formatting the cell as a number (Home → Number Format → Number). A real date will show its serial number (something like 45292). A text date will just show the text string unchanged, because changing the format of a text cell has no effect on how Excel reads it.

You can also look for the small green triangle in the upper-left corner of a cell. That triangle is Excel's warning icon for "number stored as text" — it appears when Excel suspects the cell contains something that looks numeric or date-like but is formatted as text. Click the cell, then click the yellow warning diamond that appears to the left, and choose "Convert to Number" from the dropdown.

Why Text Dates Sort Wrong

When Excel sorts text, it sorts alphabetically — character by character from left to right. So "01/15/2024" sorts before "02/01/2023" because "01" comes before "02" alphabetically, even though February 2023 is actually earlier. If your dates are in MM/DD/YYYY format, the sort puts them in month order, ignoring the year entirely. If they're in DD/MM/YYYY format, they sort by day. Neither is what you want.

This is why the underlying date format in Excel matters so much — not just how the date displays, but what type of value it actually is. And the way Excel handles Excel date formatting can sometimes make text dates look identical to real dates on screen, which is what makes this problem so insidious and hard to spot without running the ISNUMBER test.

Other Causes of Date Sorting Problems

A few less-common culprits worth checking when ISNUMBER returns TRUE but dates still don't sort right:

  • Leading or trailing spaces: "01/15/2024 " (with a trailing space) is treated as text even though it looks fine. Use =TRIM(A1) to remove them, then re-test.
  • Mixed formats in the same column: Some cells store dates as MM/DD/YYYY and others as DD/MM/YYYY — Excel can't reconcile these and sorts inconsistently. Standardize the format across the whole column first.
  • Dates from different regional settings: A file built with US date settings opened in Excel with European regional settings (or vice versa) can silently flip day and month values. A date that looks like January 3rd might actually be stored as March 1st.
  • Filter still active: If your data has a filter applied, sorted rows might appear out of order because hidden rows break the visual sequence. Clear all filters first, then sort.

Once you've identified the issue, the fix is usually straightforward. The next section walks through both Text to Columns and DATEVALUE — pick whichever suits your workflow. Most people find Text to Columns faster for a one-time fix, while DATEVALUE is better when you're building a repeatable process.

Excellence Playa Mujeres - Microsoft Excel certification study resource

Dates Not Sorting? Checklist

  • Check cell alignment — text dates are left-aligned, real dates are right-aligned
  • Run =ISNUMBER(A1) next to a date — FALSE means it's stored as text
  • Try DATEVALUE: =DATEVALUE(A1) — if it returns an error, the text format isn't recognized
  • Use Text to Columns (Data → Text to Columns → Finish) to bulk-convert text dates
  • Check for leading or trailing spaces with =LEN(A1) vs =LEN(TRIM(A1))
  • Verify all dates in the column use the same format (MM/DD/YYYY vs DD/MM/YYYY consistency)
  • Look for the green triangle warning icon — indicates a number stored as text
  • After converting, re-apply a Date format (Home → Number Format → Short Date) and sort again

How to Fix Text Dates in Excel

You've confirmed your dates are text. Now let's fix them. There are two main approaches — Text to Columns for a bulk in-place fix, and DATEVALUE for a formula-based fix that gives you more control. Both work; which you use depends on your situation.

Method 1: Text to Columns (Fastest)

This is the go-to fix when you have a whole column of text dates to convert. Select the date column, then go to Data → Text to Columns. The Convert Text to Columns Wizard opens.

In Step 1, select Delimited and click Next. In Step 2, uncheck all delimiter boxes — we're not actually splitting the column, just passing through the wizard to access the date conversion option in Step 3. Click Next.

Step 3 is where the magic happens. Under Column data format, select Date from the radio buttons. Then choose your date format from the dropdown: MDY for month/day/year (US format), DMY for day/month/year (European), or YMD for ISO 8601 format. Getting this right matters — choosing DMY for US-format dates will silently swap your days and months. Click Finish.

Excel converts all the selected cells from text to real date values, in place. No helper column needed. After the conversion, format the column as Date (Home → Number → Short Date or Long Date). Then sort — you should see correct chronological ordering immediately.

Method 2: DATEVALUE Formula

DATEVALUE converts a text string that looks like a date into an Excel serial number. The syntax is simple:

=DATEVALUE(A1)

Put this in a blank column next to your dates and copy it down. You'll see serial numbers (like 45292) rather than formatted dates — that's correct. DATEVALUE returns the underlying number. Format that column as a Date and the numbers become readable dates again.

Once you're happy with the results, copy the entire DATEVALUE column, then paste as values only — Ctrl+Shift+V → Values, or right-click → Paste Special → Values. This replaces the formulas with actual serial numbers. You can then delete the original text column and keep only the converted one.

DATEVALUE works well when you want to keep the original text dates visible for reference while building a clean sorted version alongside. For the full picture of Excel date manipulation — DATEVALUE alongside TODAY, NOW, DATEDIF, EDATE, and others — our Excel date formulas guide covers every major date function with examples.

After converting, verify it worked: run =ISNUMBER(A1) again on a few cells — they should return TRUE, and the cells should now be right-aligned. If any still show FALSE, they contained non-standard formats the wizard didn't recognize. Handle those manually or use a custom DATEVALUE with string manipulation.

Text Date Fix: Quick Formula Reference

🔢Converts text date to Excel serial numberDATEVALUE(A1)
TRUE = real date, FALSE = text date=ISNUMBER(A1)
📋Ctrl+Shift+V → Values after DATEVALUEPaste as Values
📅Home → Number → Short Date after convertFormat as Date
Excel Spreadsheet - Microsoft Excel certification study resource

Sorting by Month, Weekday, or Year in Excel

Sometimes you don't want to sort by the full date — you want to group by month (all Januaries together regardless of year) or by weekday (all Mondays first, then Tuesdays). Standard date sorting won't do this. You need a helper column approach.

Sort by month only: Add a column with =MONTH(A2). This extracts the month as a number — 1 through 12. Sort that helper column from smallest to largest and your data groups by calendar month, with all Januaries together, all Februaries together, and so on. If you want year as a tiebreaker within the same month, open the full Sort dialog and add a second level using a =YEAR(A2) helper.

Sort by day of week: Use =WEEKDAY(A2), which returns 1 (Sunday) through 7 (Saturday) by default. If you want Monday as 1, use =WEEKDAY(A2, 2). Sort the helper column 1→7 to group all Sundays (or Mondays) at the top, then Tuesdays, through to the end of the week.

After sorting, hide the helper column (right-click → Hide) rather than deleting it — that way you can re-sort by it later without rebuilding the formula. You might also want to how to change column width in excel to keep your worksheet tidy with helper columns included.

Dynamic sort with SORT function (Excel 365 only):

=SORT(A2:B10, 1, 1)

This formula sorts the range A2:B10 by the first column, ascending (use -1 for descending). It spills the sorted results into adjacent blank cells and updates automatically whenever source data changes — no manual re-sorting ever again. To sort by the second column instead: =SORT(A2:C10, 2, -1).

The SORT function is only available in Excel 365 and Excel 2021. Excel 2016 and 2019 don't have it — use the helper column method instead.

Need to separate names before sorting by a text column? Our guide on separate first and last name in excel walks through that — useful when you're building multi-level sorts with both date and name columns. And if you're working with date-based count conditions, the countifs excel guide shows how to combine COUNTIFS with date criteria for targeted analysis.

Date Sort Troubleshooting Workflow

▶️

Attempt the Sort

Select a cell in the date column. Data tab → Sort Oldest to Newest. Check whether the result looks chronological.
🔍

Check If Dates Are Real

Look at alignment (right = real date, left = text). Run =ISNUMBER(A1) — TRUE means real, FALSE means text. If FALSE, proceed to step 3.
🔄

Convert Text Dates

Select the date column. Data → Text to Columns → Delimited → Next → uncheck all delimiters → Next → select Date format (MDY/DMY/YMD) → Finish.
📅

Re-Sort

After conversion, sort again with Data → Sort Oldest to Newest. Check for expand selection prompt and confirm.

Verify

Scan first and last few rows. Confirm the earliest date is at the top (or bottom for newest-first). Run =ISNUMBER on a few cells to confirm real dates. Done.

Excel Date Sorting: Quick Reference Numbers

1️⃣Serial number 1 — Excel's date originJan 1, 1900
📊Converts text date string to serial numberDATEVALUE
📅Returns 1–12 from a date — use for month-only sortMONTH()
📆Returns 1–7 from a date — use for day-of-week sortWEEKDAY()
🔄Excel 365+ only — dynamic auto-sorting array formulaSORT function

Text to Columns vs DATEVALUE: Which Fix to Use?

Pros
  • +Text to Columns: In-place conversion — no helper column, no paste-as-values step
  • +Text to Columns: Works on entire column at once — fast for large datasets
  • +Text to Columns: Handles mixed formats with explicit MDY/DMY/YMD selection
  • +DATEVALUE: Non-destructive — original text dates stay untouched
  • +DATEVALUE: Works inside formulas — can combine with other functions
  • +DATEVALUE: Useful when building automated pipelines that refresh data
Cons
  • Text to Columns: Overwrites the original column — no undo beyond Ctrl+Z
  • Text to Columns: Won't work on dates already formatted as Date (only for text-stored values)
  • Text to Columns: Requires correct format selection — wrong MDY/DMY setting corrupts dates silently
  • DATEVALUE: Returns an error if the text format isn't recognized — requires consistent input
  • DATEVALUE: Requires extra paste-as-values step before you can delete the original column
  • DATEVALUE: Doesn't auto-convert — must be copied down manually for each row

Excel Questions and Answers

About the Author

Katherine LeeMBA, CPA, PHR, PMP

Business Consultant & Professional Certification Advisor

Wharton School, University of Pennsylvania

Katherine Lee earned her MBA from the Wharton School at the University of Pennsylvania and holds CPA, PHR, and PMP certifications. With a background spanning corporate finance, human resources, and project management, she has coached professionals preparing for CPA, CMA, PHR/SPHR, PMP, and financial services licensing exams.