Sort by date in Microsoft Excel is a key skill for organizing tasks and tracking events. But, users often encounter challenges due to format inconsistencies or dates entered as text. In this article, you will learn how to easily sort by date in Excel.
Key Takeaways:
- Sorting dates helps organize data in the correct order.
- Excel may not sort properly if dates are stored as text.
- Right-click sorting is the fastest way to sort dates.
- Custom Sort gives more control for large datasets.
- Macros can automate date sorting tasks in Excel.
Table of Contents
Introduction to Date Sorting in Excel
Sorting dates in Excel helps organize tasks, events, and reports in the correct order. It makes data easier to read and analyze. Sometimes Excel does not sort dates properly because the dates are stored as text instead of real date values. Problems can also happen when different date formats are mixed together, such as MM/DD/YYYY and DD/MM/YYYY.
Another common issue appears when dates from different years need to be sorted only by month and day, like birthdays or anniversaries. Mixed formats and incorrect entries can make sorting confusing.
How to Sort by Date
Method 1: Right-Clicking for a Quick Date Sort
Sometimes you need a quick fix, and here’s the perfect shortcut for sorting dates in a jiffy. Right-clicking provides you with a fast-track to data organization without needing to navigate the ribbons and tabs of Excel.
Follow these steps to become a right-click sort aficionado:
STEP 1: Right-click on any cell within the date column.
STEP 2: From the menu, select Sort.
STEP 3: Select an option from the list.
Voilà! Your data is sorted in chronological order.
Method 2: Custom SortThe
The Custom Sort feature allows you to be the master of your data, dictating exactly how and what gets sorted.
STEP 1: Select the date column.
STEP 2: Go to the ‘Data’ tab and select ‘Sort’.
STEP 3: In the ‘Sort’ dialog box,
- Choose the date column under ‘Sort by’.
- Specify the sort order.
Add levels if you’re managing multiple date columns or criteria.
STEP 4: Press OK.
The data will be sorted by date.
Method 3 – Writing a Macro
STEP 1: Start by pressing ALT + F11 to open the Visual Basic for Applications (VBA) editor.
STEP 2: Go to Insert > Module.
STEP 3: Copy and paste the following code into the editor.
STEP 4: Run the macro. The dates will be sorted automatically.
Tips & Tricks
- Click on your date column, right-click, and select ‘Format Cells…’ to open the formatting options.
- Go to the ‘Number’ tab, click ‘Date’, and select the format that matches your data.
- If dates that are recognized correctly in Excel, they will align to the right. If they’re not, they might be text.
- Select your entire dataset and make sure that the formatting is uniform.
- After formatting, sort a small selection to confirm that everything aligns as expected.
FAQs
How to quickly sort dates in Excel?
You can sort dates in Excel by right-clicking the date column and choosing a sort option.
What Can I Do If My Dates Won’t Sort in Chronological Order?
If dates won’t line up chronologically, convert them to a proper date format first using Text to Columns or the DATEVALUE function.
Is There a Way to Sort Dates by Weekday?
Yes, create a helper column with the WEEKDAY(date_cell) formula to assign numbers to weekdays. Then, sort by this column.
Can You Automatically Sort Dates as New Data Is Entered?
You can use a macro or a table with structured references to auto-sort dates.
Why can’t I sort by date in Excel?
If sorting by date fails in Excel, the cells may be formatted as text, or there could be inconsistent date formats.
John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.













