Sorting is an extremely useful function of Excel. Excel sort enables many options and variations so that you can sort your data with any specification.
In this tutorial, we will learn how to sort by date in Excel: we will sort a single column or the entire data by date, and also learn how to perform custom sort.
Table of Contents
Sort a Single Column by Date
If your dates are only in a single column, sorting by date is very straightforward. Let’s start…
Step 1: Select the dates in your column.
You can also select the entire column by clicking on the column name. Just make sure to remove any duplicates from that column.
Step 2: Click on Sort & Filter, which is on the top right of the Excel ribbon.
Step 3: If you want to sort lowest to highest, click on Sort A to Z.
This will sort the dates in an ascending fashion (lowest to highest):
If you want to sort from highest to lowest, click on Sort Z to A.
This will sort the dates in a descending fashion (highest to lowest):
This method works perfectly if the data you want to sort is independent of other cells or columns. Otherwise, you need to learn how to sort more than one column or the entire data.
The next section covers this case.
Also Learn: How to Sort by Last Name in Excel
Sort Entire Data by Date
Let’s say your data is spread over multiple columns, and you want to sort by date. If you sort by only selecting the date cells, the rest of your data will not be sorted, and irrelevant cells will stay in irrelevant rows. That’s why the sort selection needs to be extended to preserve data integrity.
Follow the steps below to sort your entire data by date.
Step 1: Select the column that contains the dates.
Step 2: Click on Sort & Filter, and then Sort A to Z or Sort Z to A.
Since there’s data in other columns, a pop-up will appear:
Step 3: While the “Expand the selection” option is selected, click on Sort.
Now, the entire data is sorted. As can be seen from the image below, the cells in the Name and Occupation columns followed the date cells. This way, you preserved the integrity of the data and successfully sorted it by date.
Sort Using Custom Sort
If the sort operation that you want to perform is more sophisticated than just sorting by date, then you can use Custom Sort. Custom Sort enables sorting on multiple columns and prioritizing the columns. Let’s see an example.
Step 1: Select the data you want to sort.
Step 2: Click on Sort & Filter.
Step 3: Click on Custom Sort…
The custom sort window will appear. In this window, you can choose:
- Column: which column to sort on (Date, Name, or Occupation)
- Sort On: which property to sort on (Cell Values, Cell or Font Color, Conditional Formatting Icon)
- Order: A to Z (ascending), Z to A (descending), or Custom List
If you check the “My data has headers” option, the header row (first row of each column) will not be included in the sort (freeze the header row if you want).
If you want to sort on multiple columns, you can click on “Add Level”:
Whenever you add a new level, you can choose the options mentioned above (Column, Sort On, and Order). In this example, we will first sort the Occupation column from lowest to highest.
Then, we will sort on the Date column from lowest to highest. The result is as follows:
Custom sort has first sorted the data with respect to occupation, then within each occupation, sorted with respect to the date. This is a more sophisticated version of sorting by date and shows the power of Excel.
Conclusion
In this tutorial, we learned how to sort data by date in Excel. We learned about different scenarios of data and sort options. Now you have the capability of sorting at an expert level!
If you did something wrong in the process, you can always revert to the original data and start from there.
But before you get started, learn everything that you can about dates in Excel from these articles: